Re: Const flagged as incompatible argument

2021-10-17 Thread Jonathan Wakely via Gcc
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

gcc-12-20211017 is now available

2021-10-17 Thread GCC Administrator via Gcc
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

Const flagged as incompatible argument

2021-10-17 Thread Zoltán Kócsi
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