Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!ames!oliveb!3comvax!bridge2!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Strange cc warning Message-ID: <948@auspex.UUCP> Date: 4 Feb 89 19:38:49 GMT References: <490@marob.MASA.COM> <1709@cc.helsinki.fi> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 17 >You may not use quote character (") in character variable. The part I've >marked should be '\"' and then you should not get any warnings. That may well be true, but if so the compiler in question should be fixed - and probably will be fixed, if they intend to make an ANSI C compiler out of it once the standard comes out. The May 13, 1988 dpANS claims in 3.1.3.4 "Character constants" that The double-quote " and question-mark ? are representable either by themselves or by the escape sequences \" and \? respectively.... so within *single* quotes a " by itself should be OK. I tried it on the SunOS 4.0 PCC-derived compiler and it had no problem whatsoever with '"' as a character constant. (You obviously need to escape " inside a *string* constant.)