public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28768] New: Preprocessor doesn't parse tokens correctly?
@ 2006-08-18 5:07 beethoven3322 at hotmail dot com
2006-08-18 5:11 ` [Bug c/28768] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: beethoven3322 at hotmail dot com @ 2006-08-18 5:07 UTC (permalink / raw)
To: gcc-bugs
The following C program will not compile with the command "gcc file.c":
#define FIRST "This is a split
int main() {
printf( FIRST string");
}
It gives the expected error message about the malformed preprocessor token.
However if the output of "cpp file.c" or "gcc -E file.c" is saved and fed back
into gcc then it DOES compile and run. Here is the output of "gcc -E file.c":
int main() {
printf( "This is a split string");
}
I checked the ANSI standard and this is indeed an illegal program. Shouldn't
the preprocessor give an error message when run alone?
--
Summary: Preprocessor doesn't parse tokens correctly?
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: beethoven3322 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
@ 2006-08-18 5:11 ` pinskia at gcc dot gnu dot org
2006-08-23 13:16 ` Neil Booth
2006-08-18 6:31 ` beethoven3322 at hotmail dot com
` (7 subsequent siblings)
8 siblings, 1 reply; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-18 5:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-08-18 05:11 -------
Confirmed, a regression from 3.3.3.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |3.4.0 4.0.0 4.1.0 4.2.0
Last reconfirmed|0000-00-00 00:00:00 |2006-08-18 05:11:28
date| |
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
2006-08-18 5:11 ` [Bug c/28768] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-08-18 6:31 ` beethoven3322 at hotmail dot com
2006-08-20 22:51 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: beethoven3322 at hotmail dot com @ 2006-08-18 6:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from beethoven3322 at hotmail dot com 2006-08-18 06:31 -------
On a related note, is macro prescanning of arguments part of the ANSI standard?
In "Harbison and Steele" they seem to imply argument prescanning in macros is
not ANSI-compliant...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
2006-08-18 5:11 ` [Bug c/28768] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-08-18 6:31 ` beethoven3322 at hotmail dot com
@ 2006-08-20 22:51 ` mmitchel at gcc dot gnu dot org
2006-08-20 23:07 ` joseph at codesourcery dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-08-20 22:51 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
` (2 preceding siblings ...)
2006-08-20 22:51 ` mmitchel at gcc dot gnu dot org
@ 2006-08-20 23:07 ` joseph at codesourcery dot com
2006-08-21 5:12 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: joseph at codesourcery dot com @ 2006-08-20 23:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from joseph at codesourcery dot com 2006-08-20 23:07 -------
Subject: Re: [4.0/4.1/4.2 Regression] Preprocessor doesn't
parse tokens correctly?
This bug is closely related to bug 14634 - not diagnosing these cases
with -E looks like another case of the same ill-advised extensions (which
I'd still be glad to revert to being mandatory errors).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
` (3 preceding siblings ...)
2006-08-20 23:07 ` joseph at codesourcery dot com
@ 2006-08-21 5:12 ` pinskia at gcc dot gnu dot org
2006-08-21 18:29 ` janis at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-21 5:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-08-21 05:11 -------
There is a reference to this problem in:
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01827.html
But it says it was not the cause of the problem though.
--------------------------------------------------------
Janis,
Could you do a regression hunt on this bug?
Thanks,
Andrew Pinski
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
` (4 preceding siblings ...)
2006-08-21 5:12 ` pinskia at gcc dot gnu dot org
@ 2006-08-21 18:29 ` janis at gcc dot gnu dot org
2006-08-23 13:16 ` neil at daikokuya dot co dot uk
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-08-21 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from janis at gcc dot gnu dot org 2006-08-21 18:29 -------
A regression hunt on powerpc-linux identified this patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=66019
r66019 | neil | 2003-04-23 22:44:06 +0000 (Wed, 23 Apr 2003)
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |neil at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:11 ` [Bug c/28768] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-08-23 13:16 ` Neil Booth
0 siblings, 0 replies; 11+ messages in thread
From: Neil Booth @ 2006-08-23 13:16 UTC (permalink / raw)
To: pinskia at gcc dot gnu dot org; +Cc: gcc-bugs
pinskia at gcc dot gnu dot org wrote:-
>
>
> ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-08-18 05:11 -------
> Confirmed, a regression from 3.3.3.
Rather, intended behaviour since 3.3.3.
Neil.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
` (5 preceding siblings ...)
2006-08-21 18:29 ` janis at gcc dot gnu dot org
@ 2006-08-23 13:16 ` neil at daikokuya dot co dot uk
2006-09-13 1:04 ` jsm28 at gcc dot gnu dot org
2006-09-13 2:28 ` jsm28 at gcc dot gnu dot org
8 siblings, 0 replies; 11+ messages in thread
From: neil at daikokuya dot co dot uk @ 2006-08-23 13:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from neil at daikokuya dot co dot uk 2006-08-23 13:16 -------
Subject: Re: [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens
correctly?
pinskia at gcc dot gnu dot org wrote:-
>
>
> ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-08-18 05:11 -------
> Confirmed, a regression from 3.3.3.
Rather, intended behaviour since 3.3.3.
Neil.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
` (6 preceding siblings ...)
2006-08-23 13:16 ` neil at daikokuya dot co dot uk
@ 2006-09-13 1:04 ` jsm28 at gcc dot gnu dot org
2006-09-13 2:28 ` jsm28 at gcc dot gnu dot org
8 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-09-13 1:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jsm28 at gcc dot gnu dot org 2006-09-13 01:04 -------
Subject: Bug 28768
Author: jsm28
Date: Wed Sep 13 01:04:18 2006
New Revision: 116915
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116915
Log:
libcpp:
PR c/28768
PR preprocessor/14634
* lex.c (lex_string): Pedwarn for unterminated literals.
libgomp:
* configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
to AC_DEFINE.
* configure: Regenerate.
gcc/testsuite:
* gcc.dg/cpp/include2.c, gcc.dg/cpp/macspace1.c,
gcc.dg/cpp/macspace2.c, gcc.dg/cpp/multiline.c,
gcc.dg/cpp/trad/literals-2.c: Update expected diagnostics.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/cpp/include2.c
trunk/gcc/testsuite/gcc.dg/cpp/macspace1.c
trunk/gcc/testsuite/gcc.dg/cpp/macspace2.c
trunk/gcc/testsuite/gcc.dg/cpp/multiline.c
trunk/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c
trunk/libcpp/ChangeLog
trunk/libcpp/lex.c
trunk/libgomp/ChangeLog
trunk/libgomp/configure
trunk/libgomp/configure.ac
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/28768] [4.0/4.1/4.2 Regression] Preprocessor doesn't parse tokens correctly?
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
` (7 preceding siblings ...)
2006-09-13 1:04 ` jsm28 at gcc dot gnu dot org
@ 2006-09-13 2:28 ` jsm28 at gcc dot gnu dot org
8 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-09-13 2:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jsm28 at gcc dot gnu dot org 2006-09-13 02:28 -------
Fixed in 4.2.0 by making this a mandatory pedwarn; I don't consider this
suitable to apply to past release branches which have had releases without the
pedwarn.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|4.0.4 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28768
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-09-13 2:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-18 5:07 [Bug c/28768] New: Preprocessor doesn't parse tokens correctly? beethoven3322 at hotmail dot com
2006-08-18 5:11 ` [Bug c/28768] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-08-23 13:16 ` Neil Booth
2006-08-18 6:31 ` beethoven3322 at hotmail dot com
2006-08-20 22:51 ` mmitchel at gcc dot gnu dot org
2006-08-20 23:07 ` joseph at codesourcery dot com
2006-08-21 5:12 ` pinskia at gcc dot gnu dot org
2006-08-21 18:29 ` janis at gcc dot gnu dot org
2006-08-23 13:16 ` neil at daikokuya dot co dot uk
2006-09-13 1:04 ` jsm28 at gcc dot gnu dot org
2006-09-13 2:28 ` jsm28 at gcc dot gnu 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).