Newsgroups: comp.std.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: implicitly continued string constants Message-ID: <1991May15.155113.10624@zoo.toronto.edu> Date: Wed, 15 May 1991 15:51:13 GMT References: <21455@ogicse.ogi.edu> Organization: U of Toronto Zoology In article <21455@ogicse.ogi.edu> morgan@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@zoo.toronto.edu utzoo!henry