This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: warn/croak on "string" "string" auto-joins


dewar@gnat.com (Robert Dewar)  wrote on 17.08.04 in <41228E08.2010008@gnat.com>:

> Zack Weinberg wrote:
>
> > Adam Monsen <haircut@gmail.com> 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.
>
> I would think the reasonable condition for the warning is that no
> line feed appears between the two strings, which is indeed unusual
> usage.

Without intervening line feed is pretty much the *only* way I use  
automatic concatenation. I can't immediately think of a single good reason  
to use it *with* intervening line feed ...

MfG Kai


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]