This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: warn/croak on "string" "string" auto-joins
- From: "Dave Korn" <dk at artimi dot com>
- To: "'Zack Weinberg'" <zack at codesourcery dot com>,"'Adam Monsen'" <haircut at gmail dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 17 Aug 2004 18:50:46 +0100
- Subject: RE: warn/croak on "string" "string" auto-joins
> -----Original Message-----
> From: gcc-owner On Behalf Of Zack Weinberg
> Sent: 17 August 2004 18:49
> Adam Monsen writes:
>
> > String auto-joins can be dangerous. Is there a way to tell the
> > compiler to warn/croak when an auto-join occurs?
>
> There is not, and without a way for the programmer to make clear that
> a given use of string-constant concatenation is intentional, I am
> reluctant to add one.
>
> zw
Yeh. What if you really *did* want to talk about your "Crayon-line
drawing routines"?
More seriously though, I don't see why there shouldn't be one, but rather
than make coders go through and lint-markup every place where we really
meant to concat two strings in a macro (one of which has only just been
en-quoted), maybe the warning should just default to "off"?
cheers,
DaveK
--
Can't think of a witty .sigline today....