This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52127] New: pedantic-errors is inconsistent in its behavior
- From: "jengelh at medozas dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 05 Feb 2012 21:20:35 +0000
- Subject: [Bug c/52127] New: pedantic-errors is inconsistent in its behavior
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52127
Bug #: 52127
Summary: pedantic-errors is inconsistent in its behavior
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jengelh@medozas.de
Created attachment 26577
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26577
testcase
Description:
The attached testcase, when its # lines are stripped, suddenly produces an
error.
Actions:
$ gcc -c noprob.i -std=gnu99 -pedantic -pedantic-errors
$ grep -v '^#' noprob.i >boom.i
$ gcc -c boom.i -std=gnu99 -pedantic -pedantic-errors
Actual result:
boom.i:138:3: error: ISO C99 doesnât support unnamed structs/unions [-pedantic]
Expected result:
- Either have noprob.i fail as well (because it contains the same code), or
- Have boom.i succeed, because I am compiling with GNU99 (not ISO C99) where, I
believe, unnamed structs are ok.
Additional info:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.6
--enable-linux-futex --without-system-libunwind --with-arch-32=i586
--with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.6.2 (SUSE Linux)
openSUSE 12.1
Also occurs with
gcc version 4.7.0 20120111 [trunk revision 183092] (SUSE Linux)