This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc 3.0, printf() and exim-3.30
- To: Dale Johannesen <dalej at apple dot com>
- Subject: Re: Gcc 3.0, printf() and exim-3.30
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Fri, 22 Jun 2001 07:04:21 +0100
- Cc: Nix <nix at esperi dot demon dot co dot uk>, Zack Weinberg <zackw at stanford dot edu>,Vadim Vygonets <vadik at vygo dot net>, gcc at gcc dot gnu dot org
Dale Johannesen wrote:-
> That language is in C89 also. Undefined behavior doesn't require the
> error, though. Wouldn't it be better to accept this as obviously
> intended, perhaps with a warning? The current behavior is quite
> unexpected from the user's viewpoint.
>
> printf("string1",
> #if something
> "string2",
> #endif
> "string3);
I'd be happy to accept a patch that implements it. However, I can
tell you that it is both very difficult to implement, and not at all
obvious what the semantics should be in corner cases. I think we
should leave it, and keep things simple.
Neil.