home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!ames!agate!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
- From: torek@horse.ee.lbl.gov (Chris Torek)
- Newsgroups: comp.lang.c
- Subject: Re: Simple C question
- Date: 22 Aug 1992 19:24:31 GMT
- Organization: Lawrence Berkeley Laboratory, Berkeley
- Lines: 24
- Message-ID: <25680@dog.ee.lbl.gov>
- References: <_c+nnmp@lynx.unm.edu>
- Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
- NNTP-Posting-Host: 128.3.112.15
-
- In article <_c+nnmp@lynx.unm.edu> rsahu@triton.unm.edu (Raikanta Sahu) writes:
- >Distribution: unm
- (that distribution worked really well, I see :-) )
- >I thought the following piece of code was perfectly legal.
-
- It has one bug (it returns a random value from main()), but is otherwise
- legal.
-
- > char s[] = "Hello world!" ;
- >ccom: Error: test.c, line 6: no automatic aggregate initialization
-
- You have an legal C program, but an illegal compiler. :-)
-
- More precisely, compilers that print
-
- no automatic aggregate initialization
-
- are derivatives of the Portable C Compiler (PCC), a rather ancient and
- creaky compiler that predates the ANSI C standard by more than a decade.
- PCC is nowhere near ANSI-conformant. Your best bet is to discard the
- current system and get one that at least *attempts* to be conformant.
- --
- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
- Berkeley, CA Domain: torek@ee.lbl.gov
-