This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/19040] #elif token1 token2 doesn't produce a diagnostic
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2004 21:01:36 -0000
- Subject: [Bug preprocessor/19040] #elif token1 token2 doesn't produce a diagnostic
- References: <20041216181940.19040.dpatel@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-12-16 21:01 -------
That's because it doesn't have to evaluate the #elif condition any more,
since it has already taken the #ifdef branch. If you change the code to
#ifdef BAR
return 1;
#elif BAR FOO
return 0;
#endif
}
it again issues the warning. This almost seems like a sensible approach.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19040