On Sun, 17 Oct 2021, 23:11 Zoltán Kócsi, wrote:
> Consider the following code segment:
>
> voidfoo( const char * const m[] );
>
> char*bar( void );
>
> voidbaz( void )
> {
> char*m[ 2 ];
>
> m[ 0 ] = bar();
> m[ 1 ] = bar();
>
> foo( m );
> }
>
> gcc 8.2.0
Snapshot gcc-12-20211017 is now available on
https://gcc.gnu.org/pub/gcc/snapshots/12-20211017/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 12 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch
Consider the following code segment:
voidfoo( const char * const m[] );
char*bar( void );
voidbaz( void )
{
char*m[ 2 ];
m[ 0 ] = bar();
m[ 1 ] = bar();
foo( m );
}
gcc 8.2.0 (and 7.4.1 as well) with -Wall gives a warning, for Intel or
ARM target:
test