public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant @ 2012-05-23 20:21 hp at gcc dot gnu.org 2012-05-23 20:29 ` [Bug preprocessor/53463] " hp at gcc dot gnu.org ` (9 more replies) 0 siblings, 10 replies; 11+ messages in thread From: hp at gcc dot gnu.org @ 2012-05-23 20:21 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 Bug #: 53463 Summary: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: diagnostic, rejects-valid Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned@gcc.gnu.org ReportedBy: hp@gcc.gnu.org CC: dodji@gcc.gnu.org Host: x86_64-unknown-linux-gnu Target: cris-axis-elf Created attachment 27483 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27483 First test-case failing, preprocessed. These below tests previously passed, now they fails. The svn revision r187587 exposed or caused these regressions. Since then they fail as follows: Running /tmp/bad0516b/gcc/gcc/testsuite/gcc.dg/cpp/cpp.exp ... FAIL: gcc.dg/cpp/19990407-1.c (test for excess errors) WARNING: gcc.dg/cpp/19990407-1.c compilation failed to produce executable FAIL: gcc.dg/cpp/paste12.c (test for excess errors) FAIL: gcc.dg/cpp/strp1.c (test for excess errors) WARNING: gcc.dg/cpp/strp1.c compilation failed to produce executable FAIL: gcc.dg/cpp/strp2.c (test for excess errors) WARNING: gcc.dg/cpp/strp2.c compilation failed to produce executable ... Running /tmp/bad0516b/gcc/gcc/testsuite/gcc.dg/dg.exp ... ... FAIL: gcc.dg/struct-ret-libc.c (test for excess errors) WARNING: gcc.dg/struct-ret-libc.c compilation failed to produce executable ... Running /tmp/bad0516b/gcc/gcc/testsuite/g++.dg/dg.exp ... ... FAIL: g++.dg/warn/format1.C -std=gnu++98 (test for excess errors) FAIL: g++.dg/warn/format1.C -std=gnu++11 (test for excess errors) FAIL: g++.dg/warn/huge-val1.C -std=gnu++98 (test for excess errors) ... Running /tmp/bad0516b/gcc/gcc/testsuite/gfortran.dg/dg.exp ... FAIL: gfortran.dg/bind_c_usage_16.f03 -O0 (test for excess errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -O0 compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_16.f03 -O1 (test for excess errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -O1 compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_16.f03 -O2 (test for excess errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -O2 compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_16.f03 -O3 -fomit-frame-pointer (test for excess errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -O3 -fomit-frame-pointer compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_16.f03 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -O3 -fomit-frame-pointer -funroll-loops compilation failed to produce execut\ able FAIL: gfortran.dg/bind_c_usage_16.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess\ errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions compilation f\ ailed to produce executable FAIL: gfortran.dg/bind_c_usage_16.f03 -O3 -g (test for excess errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -O3 -g compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_16.f03 -Os (test for excess errors) WARNING: gfortran.dg/bind_c_usage_16.f03 -Os compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_24.f90 -O0 (test for excess errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -O0 compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_24.f90 -O1 (test for excess errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -O1 compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_24.f90 -O2 (test for excess errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -O2 compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_24.f90 -O3 -fomit-frame-pointer (test for excess errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -O3 -fomit-frame-pointer compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_24.f90 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -O3 -fomit-frame-pointer -funroll-loops compilation failed to produce execut\ able FAIL: gfortran.dg/bind_c_usage_24.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess\ errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions compilation f\ ailed to produce executable FAIL: gfortran.dg/bind_c_usage_24.f90 -O3 -g (test for excess errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -O3 -g compilation failed to produce executable FAIL: gfortran.dg/bind_c_usage_24.f90 -Os (test for excess errors) WARNING: gfortran.dg/bind_c_usage_24.f90 -Os compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_3.f03 -O0 (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -O0 compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_3.f03 -O1 (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -O1 compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_3.f03 -O2 (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -O2 compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_3.f03 -O3 -fomit-frame-pointer (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -O3 -fomit-frame-pointer compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_3.f03 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -O3 -fomit-frame-pointer -funroll-loops compilation failed to produce execu\ table FAIL: gfortran.dg/c_funloc_tests_3.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for exces\ s errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions compilation \ failed to produce executable FAIL: gfortran.dg/c_funloc_tests_3.f03 -O3 -g (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -O3 -g compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_3.f03 -Os (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_3.f03 -Os compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_4.f03 -O0 (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -O0 compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_4.f03 -O1 (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -O1 compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_4.f03 -O2 (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -O2 compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_4.f03 -O3 -fomit-frame-pointer (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -O3 -fomit-frame-pointer compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_4.f03 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -O3 -fomit-frame-pointer -funroll-loops compilation failed to produce execu\ table FAIL: gfortran.dg/c_funloc_tests_4.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for exces\ s errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions compilation \ failed to produce executable FAIL: gfortran.dg/c_funloc_tests_4.f03 -O3 -g (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -O3 -g compilation failed to produce executable FAIL: gfortran.dg/c_funloc_tests_4.f03 -Os (test for excess errors) WARNING: gfortran.dg/c_funloc_tests_4.f03 -Os compilation failed to produce executable FAIL: gfortran.dg/c_ptr_tests_8.f03 -O0 (test for excess errors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -O0 compilation failed to produce executable FAIL: gfortran.dg/c_ptr_tests_8.f03 -O1 (test for excess errors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -O1 compilation failed to produce executable FAIL: gfortran.dg/c_ptr_tests_8.f03 -O2 (test for excess errors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -O2 compilation failed to produce executable FAIL: gfortran.dg/c_ptr_tests_8.f03 -O3 -fomit-frame-pointer (test for excess errors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -O3 -fomit-frame-pointer compilation failed to produce executable FAIL: gfortran.dg/c_ptr_tests_8.f03 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -O3 -fomit-frame-pointer -funroll-loops compilation failed to produce executab\ le FAIL: gfortran.dg/c_ptr_tests_8.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess e\ rrors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions compilation fai\ led to produce executable FAIL: gfortran.dg/c_ptr_tests_8.f03 -O3 -g (test for excess errors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -O3 -g compilation failed to produce executable FAIL: gfortran.dg/c_ptr_tests_8.f03 -Os (test for excess errors) WARNING: gfortran.dg/c_ptr_tests_8.f03 -Os compilation failed to produce executable FAIL: gfortran.dg/c_size_t_test.f03 -O0 (test for excess errors) WARNING: gfortran.dg/c_size_t_test.f03 -O0 compilation failed to produce executable FAIL: gfortran.dg/c_size_t_test.f03 -O1 (test for excess errors) WARNING: gfortran.dg/c_size_t_test.f03 -O1 compilation failed to produce executable FAIL: gfortran.dg/c_size_t_test.f03 -O2 (test for excess errors) WARNING: gfortran.dg/c_size_t_test.f03 -O2 compilation failed to produce executable FAIL: gfortran.dg/c_size_t_test.f03 -O3 -fomit-frame-pointer (test for excess errors) WARNING: gfortran.dg/c_size_t_test.f03 -O3 -fomit-frame-pointer compilation failed to produce executable FAIL: gfortran.dg/c_size_t_test.f03 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors) WARNING: gfortran.dg/c_size_t_test.f03 -O3 -fomit-frame-pointer -funroll-loops compilation failed to produce executab\ le FAIL: gfortran.dg/c_size_t_test.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess e\ rrors) WARNING: gfortran.dg/c_size_t_test.f03 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions compilation fai\ led to produce executable FAIL: gfortran.dg/c_size_t_test.f03 -O3 -g (test for excess errors) WARNING: gfortran.dg/c_size_t_test.f03 -O3 -g compilation failed to produce executable FAIL: gfortran.dg/c_size_t_test.f03 -Os (test for excess errors) WARNING: gfortran.dg/c_size_t_test.f03 -Os compilation failed to produce executable The messages in the logfiles are similar: Executing on host: /tmp/bad0516b/gccobj/gcc/xgcc -B/tmp/bad0516b/gccobj/gcc/ /tmp/bad0516b/gcc/gcc/testsuite/gcc.dg/cpp/19990407-1.c -fno-diagnostics-show-caret -ansi -pedantic-errors -isystem /tmp/bad0516b/gccobj/cris-elf/./newlib/targ-include -isystem /tmp/bad0516b/gcc/newlib/libc/include -B/tmp/bad0516b/gccobj/cris-elf/./libgloss/cris/ -L/tmp/bad0516b/gccobj/cris-elf/./libgloss/cris -L/tmp/bad0516b/gcc/libgloss/cris -B/tmp/bad0516b/gccobj/cris-elf/./newlib/ -L/tmp/bad0516b/gccobj/cris-elf/./newlib -sim3 -lm -o ./19990407-1.exe (timeout = 300) /tmp/bad0516b/gcc/newlib/libc/include/machine/_default_types.h:98:39: error: use of C99 long long integer constant [-Wlong-long]^M compiler exited with status 1 output is: /tmp/bad0516b/gcc/newlib/libc/include/machine/_default_types.h:98:39: error: use of C99 long long integer constant [-Wlong-long]^M FAIL: gcc.dg/cpp/19990407-1.c (test for excess errors) Excess errors: /tmp/bad0516b/gcc/newlib/libc/include/machine/_default_types.h:98:39: error: use of C99 long long integer constant [-Wlong-long] WARNING: gcc.dg/cpp/19990407-1.c compilation failed to produce executable I'm attaching 19990407-1.i and _default_types.h. From what I can see, the latter is considered a system header by the preprocessor just as before, still a warning is now emitted that wasn't before. A -Wno-system-headers has no effect. According to -v, the preprocessor is invoked as "/tmp/bad0516b/gccobj/gcc/cc1 -E -quiet -v -iprefix /tmp/bad0516b/gccobj/gcc/../lib/gcc/cris-elf/4.8.0/ -isystem /tmp/bad0516b/gccobj/gcc/include -isystem /tmp/bad0516b/gccobj/gcc/include-fixed -isystem /tmp/bad0516b/gccobj/cris-elf/./newlib/targ-include -isystem /tmp/bad0516b/gcc/newlib/libc/include /tmp/bad0516b/gcc/gcc/testsuite/gcc.dg/cpp/19990407-1.c -melf -ansi -pedantic-errors -fno-diagnostics-show-caret -fpch-preprocess -o 19990407-1.i" which yields: ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/cris-elf/4.8.0/include" ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/cris-elf/4.8.0/include-fixed" ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/cris-elf/4.8.0/../../../../cris-elf/sys-include" ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/cris-elf/4.8.0/../../../../cris-elf/include" ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/../../lib/gcc/cris-elf/4.8.0/include" ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/../../lib/gcc/cris-elf/4.8.0/include-fixed" ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/../../lib/gcc/cris-elf/4.8.0/../../../../cris-elf/sys-include" ignoring nonexistent directory "/tmp/bad0516b/gccobj/gcc/../lib/gcc/../../lib/gcc/cris-elf/4.8.0/../../../../cris-elf/include" #include "..." search starts here: #include <...> search starts here: /tmp/bad0516b/gccobj/gcc/include /tmp/bad0516b/gccobj/gcc/include-fixed /tmp/bad0516b/gccobj/cris-elf/./newlib/targ-include /tmp/bad0516b/gcc/newlib/libc/include End of search list. /tmp/bad0516b/gcc/newlib/libc/include/machine/_default_types.h:98:39: error: use of C99 long long integer constant [-Wlong-long] Author of the patch in that revision is CC:ed. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org @ 2012-05-23 20:29 ` hp at gcc dot gnu.org 2012-05-23 20:58 ` pinskia at gcc dot gnu.org ` (8 subsequent siblings) 9 siblings, 0 replies; 11+ messages in thread From: hp at gcc dot gnu.org @ 2012-05-23 20:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 --- Comment #1 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-05-23 20:21:01 UTC --- Created attachment 27484 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27484 The offending system header _default_types.h, fresh from newlib. A brief look in gcc-testresults archives expectedly shows this regression for other newlib targets too. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org 2012-05-23 20:29 ` [Bug preprocessor/53463] " hp at gcc dot gnu.org @ 2012-05-23 20:58 ` pinskia at gcc dot gnu.org 2012-05-24 13:09 ` Greta.Yorsh at arm dot com ` (7 subsequent siblings) 9 siblings, 0 replies; 11+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-05-23 20:58 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.8.0 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org 2012-05-23 20:29 ` [Bug preprocessor/53463] " hp at gcc dot gnu.org 2012-05-23 20:58 ` pinskia at gcc dot gnu.org @ 2012-05-24 13:09 ` Greta.Yorsh at arm dot com 2012-05-25 8:53 ` dodji at gcc dot gnu.org ` (6 subsequent siblings) 9 siblings, 0 replies; 11+ messages in thread From: Greta.Yorsh at arm dot com @ 2012-05-24 13:09 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 Greta Yorsh <Greta.Yorsh at arm dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Greta.Yorsh at arm dot com --- Comment #2 from Greta Yorsh <Greta.Yorsh at arm dot com> 2012-05-24 13:08:57 UTC --- The following tests fail on arm-none-eabi: FAIL: gcc.dg/cpp/19990407-1.c (test for excess errors) FAIL: gcc.dg/cpp/paste12.c (test for excess errors) FAIL: gcc.dg/cpp/strp1.c (test for excess errors) FAIL: gcc.dg/cpp/strp2.c (test for excess errors) FAIL: gcc.dg/struct-ret-libc.c (test for excess errors) For example: /work/builds/a9-may/install/bin/arm-none-eabi-gcc /work/local-checkouts/gcc-fsf/gcc/testsuite/gcc.dg/cpp/19990407-1.c -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon -fno-diagnostics-show-caret -pedantic-errors -o 19990407-1.exe /work/builds/a9-may/install/arm-none-eabi/include/machine/_default_types.h:98:39: error: use of C99 long long integer constant [-Wlong-long] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org ` (2 preceding siblings ...) 2012-05-24 13:09 ` Greta.Yorsh at arm dot com @ 2012-05-25 8:53 ` dodji at gcc dot gnu.org 2012-05-25 10:07 ` dodji at gcc dot gnu.org ` (5 subsequent siblings) 9 siblings, 0 replies; 11+ messages in thread From: dodji at gcc dot gnu.org @ 2012-05-25 8:53 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 Dodji Seketeli <dodji at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-05-25 AssignedTo|unassigned at gcc dot |dodji at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org ` (3 preceding siblings ...) 2012-05-25 8:53 ` dodji at gcc dot gnu.org @ 2012-05-25 10:07 ` dodji at gcc dot gnu.org 2012-05-26 9:08 ` hp at gcc dot gnu.org ` (4 subsequent siblings) 9 siblings, 0 replies; 11+ messages in thread From: dodji at gcc dot gnu.org @ 2012-05-25 10:07 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 --- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-25 09:58:42 UTC --- It seems to me that this issue is dealt with by the patch I have proposed at http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01389.html. The discussion on that patch is still going on. Could you please try that patch and reply to the discussion there to say if it address the issue on your target? Thanks. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org ` (4 preceding siblings ...) 2012-05-25 10:07 ` dodji at gcc dot gnu.org @ 2012-05-26 9:08 ` hp at gcc dot gnu.org 2012-05-28 15:50 ` Greta.Yorsh at arm dot com ` (3 subsequent siblings) 9 siblings, 0 replies; 11+ messages in thread From: hp at gcc dot gnu.org @ 2012-05-26 9:08 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 --- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-05-26 01:50:09 UTC --- (In reply to comment #3) > Could you please try that patch and reply to the discussion there to say if it > address the issue on your target? It does thanks, see the reply. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org ` (5 preceding siblings ...) 2012-05-26 9:08 ` hp at gcc dot gnu.org @ 2012-05-28 15:50 ` Greta.Yorsh at arm dot com 2012-06-04 19:20 ` dodji at gcc dot gnu.org ` (2 subsequent siblings) 9 siblings, 0 replies; 11+ messages in thread From: Greta.Yorsh at arm dot com @ 2012-05-28 15:50 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 --- Comment #5 from Greta Yorsh <Greta.Yorsh at arm dot com> 2012-05-28 15:28:16 UTC --- (In reply to comment #3) > It seems to me that this issue is dealt with by the patch I have proposed at > http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01389.html. The discussion on > that patch is still going on. > > Could you please try that patch and reply to the discussion there to say if it > address the issue on your target? > > Thanks. This patch fixes the regressions observed for arm-none-eabi. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org ` (6 preceding siblings ...) 2012-05-28 15:50 ` Greta.Yorsh at arm dot com @ 2012-06-04 19:20 ` dodji at gcc dot gnu.org 2012-06-04 19:57 ` dodji at seketeli dot org 2012-06-05 8:30 ` hp at gcc dot gnu.org 9 siblings, 0 replies; 11+ messages in thread From: dodji at gcc dot gnu.org @ 2012-06-04 19:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 --- Comment #6 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-06-04 19:20:16 UTC --- Author: dodji Date: Mon Jun 4 19:19:58 2012 New Revision: 188203 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188203 Log: PR preprocessor/53463 - Fix system header detection for built-in macro tokens The location for a built-in macro token is BUILTIN_LOCATION. When we see that location value, we cannot know if that token was used in a system header or not. And that can trigger some unwanted warnings on e.g, the use of __LONG_LONG_MAX__ built-in macro in system headers when we compile with -pedantic, like in the test case accompanying this patch. In that case, I think we ought to step-up to see where the built-in macro has been expanded, until we see a location that is not for a built-in macro. Then we can check if the resulting location is in a system header or not. Now that we step up to the location of first non-built-in-macro token, it appeared that for testsuite/c-c++-common/dfp/convert-int-saturate.c, G++ then fails to emit the warning in: volatile unsigned int usi; int main () { usi = DEC32_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ ... } Because DEC32_MAX is defined in the system header float.h as a built-in macro: #define DEC32_MAX __DEC32_MAX__ And during the parsing of the assignment expression that should have led to the warning above, input_location is set to the location for the DEC32_MAX, which is actually the location for the built-in __DECL32_MAX_EXP. A possible fix is to use the location of the "=" operator as the default location for assignment expressions. This is what the patch does. I had to adjust a couple of tests to arrange for this. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. libcpp/ PR preprocessor/53463 * line-map.c (linemap_location_in_system_header_p): For built-in macro tokens, check the first expansion point location for that is not for a token coming from a built-in macro. gcc/cp/ PR preprocessor/53463 * parser.c (cp_parser_assignment_expression): Use the location for the LHS as the default location for the expression. gcc/testsuite/ PR preprocessor/53463 * g++.dg/cpp/limits.C: New test. * g++.dg/parse/error19.C: Adjust. * g++.dg/warn/Wconversion-real-integer2.C: Likewise. * g++.dg/warn/pr35635.C: Likewise. * g++.old-deja/g++.pt/assign1.C: Likewise. Added: trunk/gcc/testsuite/g++.dg/cpp/limits.C Modified: trunk/gcc/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/parse/error19.C trunk/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C trunk/gcc/testsuite/g++.dg/warn/pr35635.C trunk/gcc/testsuite/g++.old-deja/g++.pt/assign1.C trunk/libcpp/ChangeLog trunk/libcpp/line-map.c ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org ` (7 preceding siblings ...) 2012-06-04 19:20 ` dodji at gcc dot gnu.org @ 2012-06-04 19:57 ` dodji at seketeli dot org 2012-06-05 8:30 ` hp at gcc dot gnu.org 9 siblings, 0 replies; 11+ messages in thread From: dodji at seketeli dot org @ 2012-06-04 19:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 --- Comment #7 from dodji at seketeli dot org <dodji at seketeli dot org> 2012-06-04 19:57:31 UTC --- Hans-Peter and Greta, Could you please test trunk and, if the commit above fixes the issue for you, close the bug please? Thank you in advance. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/53463] [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org ` (8 preceding siblings ...) 2012-06-04 19:57 ` dodji at seketeli dot org @ 2012-06-05 8:30 ` hp at gcc dot gnu.org 9 siblings, 0 replies; 11+ messages in thread From: hp at gcc dot gnu.org @ 2012-06-05 8:30 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53463 Hans-Peter Nilsson <hp at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #8 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-06-05 08:29:39 UTC --- (In reply to comment #7) > Hans-Peter and Greta, > > Could you please test trunk and, if the commit above fixes the issue for > you, close the bug please? Yes, thanks. The witch is cooked (SCNR :) ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-06-05 8:30 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-05-23 20:21 [Bug preprocessor/53463] New: [4.8 Regression]: system header not recognized, yielding warnings about long long preprocessor constant hp at gcc dot gnu.org 2012-05-23 20:29 ` [Bug preprocessor/53463] " hp at gcc dot gnu.org 2012-05-23 20:58 ` pinskia at gcc dot gnu.org 2012-05-24 13:09 ` Greta.Yorsh at arm dot com 2012-05-25 8:53 ` dodji at gcc dot gnu.org 2012-05-25 10:07 ` dodji at gcc dot gnu.org 2012-05-26 9:08 ` hp at gcc dot gnu.org 2012-05-28 15:50 ` Greta.Yorsh at arm dot com 2012-06-04 19:20 ` dodji at gcc dot gnu.org 2012-06-04 19:57 ` dodji at seketeli dot org 2012-06-05 8:30 ` hp at gcc dot gnu.org
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).