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
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