This is the mail archive of the
mailing list for the GCC project.
Re: Charconst valuation and short-circuiting
- From: Bonzini <bonzini at gnu dot org>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 06 May 2002 07:07:02 -0400
- Subject: Re: Charconst valuation and short-circuiting
> Should GCC not be attempting to value the character constant in
> the following code (and therefore not give a hard error about
> a too-long charconst?)
> if (0 && 'abcdefghijk')
I don't think so. It is not unlikely to why you use if's instead
of #ifdef's so that dead code is eliminated but still flags errors.
If you wanted no errors, you'd use a preprocessor condition (I'm assuming
that 0 is valuable at compilation time, and hence at preprocessing time,
maybe with some help from autoconf a la SIZEOF_LONG).