public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/28227] New: valid #ifdef rejected
@ 2006-07-03 1:22 sabre at nondot dot org
2006-12-28 1:29 ` [Bug preprocessor/28227] " tromey at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: sabre at nondot dot org @ 2006-07-03 1:22 UTC (permalink / raw)
To: gcc-bugs
GCC rejects this:
#ifdef defined
#endif
Even though C99 6.10.8.4 specifies that 'defined' is only disallowed after
#undef or #define.
-Chris
--
Summary: valid #ifdef rejected
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=28227
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/28227] valid #ifdef rejected
2006-07-03 1:22 [Bug preprocessor/28227] New: valid #ifdef rejected sabre at nondot dot org
@ 2006-12-28 1:29 ` tromey at gcc dot gnu dot org
2006-12-29 17:35 ` patchapp at dberlin dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-28 1:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tromey at gcc dot gnu dot org 2006-12-28 01:28 -------
Also 6.10.8.4 says that various other macros, like __DATE__,
shall not be the subject of #define or #undef. Currently we
warn in these cases but perhaps we ought to have a pedwarn instead.
I have a patch for the '#ifdef defined' case which I am testing.
Also I note that '#if defined defined' is undefined.
I wonder if we ought to warn for this.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-12-28 01:28:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28227
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/28227] valid #ifdef rejected
2006-07-03 1:22 [Bug preprocessor/28227] New: valid #ifdef rejected sabre at nondot dot org
2006-12-28 1:29 ` [Bug preprocessor/28227] " tromey at gcc dot gnu dot org
@ 2006-12-29 17:35 ` patchapp at dberlin dot org
2007-01-08 1:30 ` tromey at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: patchapp at dberlin dot org @ 2006-12-29 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from patchapp at dberlin dot org 2006-12-29 17:35 -------
Subject: Bug number PR preprocessor/28227
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01835.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28227
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/28227] valid #ifdef rejected
2006-07-03 1:22 [Bug preprocessor/28227] New: valid #ifdef rejected sabre at nondot dot org
2006-12-28 1:29 ` [Bug preprocessor/28227] " tromey at gcc dot gnu dot org
2006-12-29 17:35 ` patchapp at dberlin dot org
@ 2007-01-08 1:30 ` tromey at gcc dot gnu dot org
2007-01-12 19:47 ` tromey at gcc dot gnu dot org
2007-01-14 5:36 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-08 1:30 UTC (permalink / raw)
To: gcc-bugs
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |tromey at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-12-28 01:28:56 |2007-01-08 01:30:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28227
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/28227] valid #ifdef rejected
2006-07-03 1:22 [Bug preprocessor/28227] New: valid #ifdef rejected sabre at nondot dot org
` (2 preceding siblings ...)
2007-01-08 1:30 ` tromey at gcc dot gnu dot org
@ 2007-01-12 19:47 ` tromey at gcc dot gnu dot org
2007-01-14 5:36 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-12 19:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tromey at gcc dot gnu dot org 2007-01-12 19:47 -------
Subject: Bug 28227
Author: tromey
Date: Fri Jan 12 19:46:49 2007
New Revision: 120731
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120731
Log:
libcpp
PR preprocessor/28227:
* directives.c (lex_macro_node): Added 'is_def_or_undef'
argument.
(do_define): Update.
(do_undef): Update.
(do_ifdef): Update.
(do_ifndef): Update.
gcc/testsuite
PR preprocessor/28227:
* gcc.dg/cpp/pr28227.c: New file.
Added:
trunk/gcc/testsuite/gcc.dg/cpp/pr28227.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libcpp/ChangeLog
trunk/libcpp/directives.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28227
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/28227] valid #ifdef rejected
2006-07-03 1:22 [Bug preprocessor/28227] New: valid #ifdef rejected sabre at nondot dot org
` (3 preceding siblings ...)
2007-01-12 19:47 ` tromey at gcc dot gnu dot org
@ 2007-01-14 5:36 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-14 5:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-01-14 05:36 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28227
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-01-14 5:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-03 1:22 [Bug preprocessor/28227] New: valid #ifdef rejected sabre at nondot dot org
2006-12-28 1:29 ` [Bug preprocessor/28227] " tromey at gcc dot gnu dot org
2006-12-29 17:35 ` patchapp at dberlin dot org
2007-01-08 1:30 ` tromey at gcc dot gnu dot org
2007-01-12 19:47 ` tromey at gcc dot gnu dot org
2007-01-14 5:36 ` pinskia 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).