Re: GCC is depreciating multi-line strings

Christopher Faylor
2001-03-21T15:59:00Z

On Tue, Mar 20, 2001 at 06:04:47PM -0500, Andrew Cagney wrote:
>Um, I'm slightly confused. What exactly is ment by multi-line strings?
>I've found this link and am still looking :-)
>
> http://gcc.gnu.org/ml/gcc/2001-03/msg00855.html

Cygwin has been bit by this recent change.

a = "This is
the multiline string
that has been deprecated.";

gcc stores that as three separate lines.

The "correct" way to do this is:

a = "This is\n\
the multiline string\n\
which has not been deprecated.";

This is also ok, of course:

a = "abc\
def";

It is equivalent to:

a = "abcdef";

The reason for deprecating the non \ usage is that it is not portable.

If gdb uses this construct, I have a hard time believing that this could
be true.

A quick grep seems to show that gdb is doing the right thing so I really
don't think that this is an issue.

cgf