public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/59566] New: [4.8 regression] g++ preprocessor output includes comments meant for GNU C Library files
@ 2013-12-20 4:12 gdlxn at us dot ibm.com
2013-12-20 10:13 ` [Bug preprocessor/59566] [4.8/4.9 " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gdlxn at us dot ibm.com @ 2013-12-20 4:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59566
Bug ID: 59566
Summary: [4.8 regression] g++ preprocessor output includes
comments meant for GNU C Library files
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: gdlxn at us dot ibm.com
Created attachment 31484
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31484&action=edit
Example input and output files
I've found that g++ 4.8.x preprocessor output unexpectedly includes comments
meant for GNU C Library files.
To illustrate this problem, I ran the g++ preprocessor on test.hpp using as
follows
g++ -C -E -o test-<gcc-version>.hpp -P test.hpp
With g++ 4.7.3, this generated the expected output file. However, with g++
4.8.0, 4.8.1, and 4.8.2 the generated output file unexpectedly contained a
number of comments meant for GNU C Library files.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/59566] [4.8/4.9 regression] g++ preprocessor output includes comments meant for GNU C Library files
2013-12-20 4:12 [Bug preprocessor/59566] New: [4.8 regression] g++ preprocessor output includes comments meant for GNU C Library files gdlxn at us dot ibm.com
@ 2013-12-20 10:13 ` rguenth at gcc dot gnu.org
2013-12-20 12:16 ` jakub at gcc dot gnu.org
2013-12-20 15:43 ` gdlxn at us dot ibm.com
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-12-20 10:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59566
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2013-12-20
Target Milestone|--- |4.8.3
Summary|[4.8 regression] g++ |[4.8/4.9 regression] g++
|preprocessor output |preprocessor output
|includes comments meant for |includes comments meant for
|GNU C Library files |GNU C Library files
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
You are using -C, so what do you expect? Note that since 4.8.x GCC
automatically
includes stdc-predef.h (which you can see when you remove the -P option). The
comment nicely explains in the last sentence:
/* This header is separate from features.h so that the compiler can
include it implicitly at the start of every compilation. It must
not itself include <features.h> or any other header that includes
<features.h> because the implicit include comes before any feature
test macros that may be defined in a source file before it first
explicitly includes a system header. GCC knows the name of this
header in order to preinclude it. */
Thus, it works as designed. No?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/59566] [4.8/4.9 regression] g++ preprocessor output includes comments meant for GNU C Library files
2013-12-20 4:12 [Bug preprocessor/59566] New: [4.8 regression] g++ preprocessor output includes comments meant for GNU C Library files gdlxn at us dot ibm.com
2013-12-20 10:13 ` [Bug preprocessor/59566] [4.8/4.9 " rguenth at gcc dot gnu.org
@ 2013-12-20 12:16 ` jakub at gcc dot gnu.org
2013-12-20 15:43 ` gdlxn at us dot ibm.com
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-20 12:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59566
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, that is not a bug.
With -ffreestanding, -nostdinc or -fpreprocessed <stdc-predef.h> isn't
automatically included, but you then have to deal with the other effects of
those options.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/59566] [4.8/4.9 regression] g++ preprocessor output includes comments meant for GNU C Library files
2013-12-20 4:12 [Bug preprocessor/59566] New: [4.8 regression] g++ preprocessor output includes comments meant for GNU C Library files gdlxn at us dot ibm.com
2013-12-20 10:13 ` [Bug preprocessor/59566] [4.8/4.9 " rguenth at gcc dot gnu.org
2013-12-20 12:16 ` jakub at gcc dot gnu.org
@ 2013-12-20 15:43 ` gdlxn at us dot ibm.com
2 siblings, 0 replies; 4+ messages in thread
From: gdlxn at us dot ibm.com @ 2013-12-20 15:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59566
--- Comment #3 from gdlxn at us dot ibm.com ---
Richard and Jakub - Thanks for the quick response and explanation. I was able
to use the -nostdinc option to suppress the automatic inclusion of
<stdc-predef.h>, which eliminates the unwanted comments.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-20 15:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 4:12 [Bug preprocessor/59566] New: [4.8 regression] g++ preprocessor output includes comments meant for GNU C Library files gdlxn at us dot ibm.com
2013-12-20 10:13 ` [Bug preprocessor/59566] [4.8/4.9 " rguenth at gcc dot gnu.org
2013-12-20 12:16 ` jakub at gcc dot gnu.org
2013-12-20 15:43 ` gdlxn at us dot ibm.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).