This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/19040] New: #elif token1 token2 doesn't produce a diagnostic
- From: "dpatel at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2004 18:19:41 -0000
- Subject: [Bug preprocessor/19040] New: #elif token1 token2 doesn't produce a diagnostic
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC emits diagnostics for following...
$ cat a.c
int foo()
{
#ifdef FOO
return 1;
#elif BAR FOO
return 0;
#endif
}
$ cc a.c -c
a.c:6:11: error: missing binary operator before token "FOO"
$
However, it does not emit diagnostics for following ...
$ cat a.c
#define FOO 1
int foo()
{
#ifdef FOO
return 1;
#elif BAR FOO
return 0;
#endif
}
--
Summary: #elif token1 token2 doesn't produce a diagnostic
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dpatel at apple dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19040