This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
My collegue just today noticed that gcc version 3.4.0 behaves a bid odd on Linux when --pedantic-errors is used as compilation option to C-compiler (gcc): <helix:/tmp> cat main.c #include <stdio.h> #include <stdlib.h> int main(void){printf("Hello world\n"); exit(EXIT_SUCCESS);} <helix:/tmp> gcc --version gcc (GCC) 3.4.0 Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. <helix:/tmp> gcc --pedantic main.c <helix:/tmp> gcc --pedantic-errors main.c In file included from /usr/include/libio.h:32, from /usr/include/stdio.h:65, from main.c:1: /usr/include/_G_config.h:50: error: invalid use of structure with flexible array member <helix:/tmp> If g++ is used instead of gcc: <helix:/tmp> g++ --version g++ (GCC) 3.4.0 Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. <helix:/tmp> g++ --pedantic main.c <helix:/tmp> g++ --pedantic-errors main.c <helix:/tmp> This problem does not happen on Solaris/HPUX version nor does it happen when older version (tested with 3.3.3 and 2.95.3) of gcc is used.
SORRY! One should never press "reload" when "bug submitted" page is open. I don't know how to remove bugs (if it possible at all) thus I mark this as duplicate to the original. *** This bug has been marked as a duplicate of 15749 ***