public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15749] New: --pedantic-errors behaves differently from --pedantic with C-compiler on Linux
@ 2004-05-31 22:57 Tuomo dot Tikkanen at nokia dot com
  0 siblings, 0 replies; only message in thread
From: Tuomo dot Tikkanen at nokia dot com @ 2004-05-31 22:57 UTC (permalink / raw)
  To: gcc-bugs

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.

-- 
           Summary: --pedantic-errors behaves differently from --pedantic
                    with C-compiler on Linux
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Tuomo dot Tikkanen at nokia dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15749


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-31 14:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-31 22:57 [Bug c/15749] New: --pedantic-errors behaves differently from --pedantic with C-compiler on Linux Tuomo dot Tikkanen at nokia dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).