implicitly continued string constants
Henry Spencer
henry at zoo.toronto.edu
Thu May 16 01:51:13 AEST 1991
In article <21455 at ogicse.ogi.edu> morgan at ogicse.cse.ogi.edu (Clark O. Morgan) writes:
>I noticed the other day that gcc (version 1.39) does not error
>implicitly continued string constants (e.g., string constants that
>contain actual newlines)...
>
>So here's the question, is the following program legal ANSI C?
No. Newline is specifically excluded from the list of characters that
can occur within an ANSI C string literal.
You err in assuming that gcc is an ANSI C compiler, however. It will try
to pretend to be one if you give the right magic combination of options,
but by default it compiles something which is neither old C nor ANSI C.
--
And the bean-counter replied, | Henry Spencer @ U of Toronto Zoology
"beans are more important". | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.std.c
mailing list