Path: utzoo!utgpu!water!watmath!watdragon!lotus!jyegiguere From: jyegiguere@lotus.waterloo.edu (Eric Giguere) Newsgroups: comp.sys.amiga Subject: Re: Don't forget the comma Summary: It's not a bug... it's ANSI Message-ID: <9263@watdragon.waterloo.edu> Date: 23 Oct 88 02:53:45 GMT References: <8810192323.AA21255@jade.berkeley.edu> Sender: daemon@watdragon.waterloo.edu Reply-To: jyegiguere@lotus.waterloo.edu (Eric Giguere) Distribution: na Organization: U. of Waterloo, Ontario Lines: 24 In article <8810192323.AA21255@jade.berkeley.edu> writes: >[] >Has anyone else run into this "feature" of Manx C? >It happens with both 3.4b and 3.6a (at least, the ones I have). >Minimal case - > >char *array[] = { "s1" "s2" }; > >That's it. >Now, it seems obvious to me (and every other compiler I >have used) that this is a syntax error. But the Manx compiler never even >burps. What it does do is concat "s1" and "s2" into "s1s2" and put just the >one pointer into array. This one took me quite a while to find once when >I had a large array and forgot a few commas. This isn't a bug... I imagine it's one step in Manx' upgrading to ANSI C. In ANSI C, two strings separated only by whitespace are automatically concatenated.... useful for long strings. -- --------------------------------------------------------------------------- Eric Giguere 268 Phillip St. #CL-46, Waterloo, Ont. N2L 6G9 jyegiguere@lotus.waterloo.edu (519) 746-0792 GIGUERE@WATCSG.BITNET "No, that's not how you pronounce it..."