gcc-11-20230310 is now available

2023-03-10 Thread GCC Administrator via Gcc
Snapshot gcc-11-20230310 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-20230310/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 11 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

Re: No warning about duplicate values in enum

2023-03-10 Thread Marek Polacek via Gcc
On Fri, Mar 10, 2023 at 01:57:06PM +0100, Andrea Monaco via Gcc wrote: > > In gcc 8.3.0, compiling > > > enum > test > { > FIRST = 1, > SECOND = 1, > THIRD = 2 > }; > > int > main (void) > { > return 0; > } > > > generates no warning even with -Wextra. That hit me today, be

No warning about duplicate values in enum

2023-03-10 Thread Andrea Monaco via Gcc
In gcc 8.3.0, compiling enum test { FIRST = 1, SECOND = 1, THIRD = 2 }; int main (void) { return 0; } generates no warning even with -Wextra. That hit me today, because I had a large enum with many explicitly assigned constants and I accidentally used the same value twice,