public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs
@ 2006-07-28 6:26 sabre at nondot dot org
2006-07-28 16:23 ` [Bug preprocessor/28521] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: sabre at nondot dot org @ 2006-07-28 6:26 UTC (permalink / raw)
To: gcc-bugs
gcc -E on:
#define z ?
?z(
emits:
??(
This won't lex correctly when trigraphs are enabled.
-Chris
--
Summary: -E output incorrectly concatenates tokens into trigraphs
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sabre at nondot dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
@ 2006-07-28 16:23 ` pinskia at gcc dot gnu dot org
2006-07-28 16:27 ` sabre at nondot dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-28 16:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-07-28 16:23 -------
Hmm, phase 1 (which includes trigraphs) preprocessing happens before phase 2
(macros) so I don't think this is a bug. And macros cannot produce trigraphs
either.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
2006-07-28 16:23 ` [Bug preprocessor/28521] " pinskia at gcc dot gnu dot org
@ 2006-07-28 16:27 ` sabre at nondot dot org
2006-07-28 23:48 ` neil at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sabre at nondot dot org @ 2006-07-28 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sabre at nondot dot org 2006-07-28 16:26 -------
It should print a space for the same reason that this does:
#define x -
-x
-Chris
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
2006-07-28 16:23 ` [Bug preprocessor/28521] " pinskia at gcc dot gnu dot org
2006-07-28 16:27 ` sabre at nondot dot org
@ 2006-07-28 23:48 ` neil at gcc dot gnu dot org
2006-07-28 23:59 ` sabre at nondot dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: neil at gcc dot gnu dot org @ 2006-07-28 23:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from neil at gcc dot gnu dot org 2006-07-28 23:48 -------
Tokenization is correct since preprocessed output has been through stages 1-3
and starts at stage 4. If you're passing -trigraphs then your command line is
incorrect.
--
neil at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
` (2 preceding siblings ...)
2006-07-28 23:48 ` neil at gcc dot gnu dot org
@ 2006-07-28 23:59 ` sabre at nondot dot org
2006-07-29 0:05 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sabre at nondot dot org @ 2006-07-28 23:59 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
------- Comment #4 from sabre at nondot dot org 2006-07-28 23:59 -------
I realize that tokenization is correct. As per:
http://gcc.gnu.org/onlinedocs/cppinternals/Token-Spacing.html#Token-Spacing
GCC should be emitting the space so that the subsequent relex of the output
won't lex incorrectly.
-Chris
--
sabre at nondot dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
` (3 preceding siblings ...)
2006-07-28 23:59 ` sabre at nondot dot org
@ 2006-07-29 0:05 ` pinskia at gcc dot gnu dot org
2006-07-29 0:08 ` sabre at nondot dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-29 0:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-07-29 00:05 -------
No it is not a token. It is a trigraph which is different than a token.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
` (4 preceding siblings ...)
2006-07-29 0:05 ` pinskia at gcc dot gnu dot org
@ 2006-07-29 0:08 ` sabre at nondot dot org
2006-07-29 0:32 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sabre at nondot dot org @ 2006-07-29 0:08 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
------- Comment #6 from sabre at nondot dot org 2006-07-29 00:08 -------
Andrew, I'm well aware that a trigraph is not a token. If you read the report,
I say that "gcc -E" produces output that a subsequent GCC will not reparse into
the same result.
Again, this is the whole point of:
http://gcc.gnu.org/onlinedocs/cppinternals/Token-Spacing.html#Token-Spacing
and the reason why GCC doesn't "-E" this:
#define x -
-x
to "--"
-Chris
--
sabre at nondot dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
` (5 preceding siblings ...)
2006-07-29 0:08 ` sabre at nondot dot org
@ 2006-07-29 0:32 ` steven at gcc dot gnu dot org
2006-07-29 5:03 ` neil at gcc dot gnu dot org
2006-07-29 5:04 ` sabre at nondot dot org
8 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-07-29 0:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from steven at gcc dot gnu dot org 2006-07-29 00:32 -------
Seems like a bug to me alright.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-07-29 00:32:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
` (6 preceding siblings ...)
2006-07-29 0:32 ` steven at gcc dot gnu dot org
@ 2006-07-29 5:03 ` neil at gcc dot gnu dot org
2006-07-29 5:04 ` sabre at nondot dot org
8 siblings, 0 replies; 10+ messages in thread
From: neil at gcc dot gnu dot org @ 2006-07-29 5:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from neil at gcc dot gnu dot org 2006-07-29 05:02 -------
This is not a bug. If you are preprocessing preprocessed output, you must use
-fpreprocessed as documented. Otherwise many other things will go wrong, not
just this. The bug is on your command line.
--
neil at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/28521] -E output incorrectly concatenates tokens into trigraphs
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
` (7 preceding siblings ...)
2006-07-29 5:03 ` neil at gcc dot gnu dot org
@ 2006-07-29 5:04 ` sabre at nondot dot org
8 siblings, 0 replies; 10+ messages in thread
From: sabre at nondot dot org @ 2006-07-29 5:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from sabre at nondot dot org 2006-07-29 05:03 -------
ok
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28521
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-07-29 5:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-28 6:26 [Bug preprocessor/28521] New: -E output incorrectly concatenates tokens into trigraphs sabre at nondot dot org
2006-07-28 16:23 ` [Bug preprocessor/28521] " pinskia at gcc dot gnu dot org
2006-07-28 16:27 ` sabre at nondot dot org
2006-07-28 23:48 ` neil at gcc dot gnu dot org
2006-07-28 23:59 ` sabre at nondot dot org
2006-07-29 0:05 ` pinskia at gcc dot gnu dot org
2006-07-29 0:08 ` sabre at nondot dot org
2006-07-29 0:32 ` steven at gcc dot gnu dot org
2006-07-29 5:03 ` neil at gcc dot gnu dot org
2006-07-29 5:04 ` sabre at nondot dot 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).