This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/22168] #if #A == #B should have a diagnostic
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2005 15:42:19 -0000
- Subject: [Bug preprocessor/22168] #if #A == #B should have a diagnostic
- References: <20050624020406.22168.geoffk@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at physics dot uc dot edu 2005-06-24 15:42 -------
Subject: Re: New: #if #A == #B should have a diagnostic
On Jun 23, 2005, at 10:04 PM, geoffk at gcc dot gnu dot org wrote:
> GCC quietly accepts the following:
>
> #define A a
> #define B a
> #if #A == #B
> #endif
In fact if we look at the output for the following code:
#define A b
#define B c
#if #A == #B
void g(void);
#endif
We find that "void g(void);" is always outputted so in fact
it does not do what David wanted it to do.
Thanks,
Andrew Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22168