Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!gatech!bloom-beacon!oberon!cit-vax!elroy!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Turbo C and "empty" arrays Message-ID: <23127@sun.uucp> Date: Thu, 9-Jul-87 23:58:49 EDT Article-I.D.: sun.23127 Posted: Thu Jul 9 23:58:49 1987 Date-Received: Sun, 12-Jul-87 10:17:41 EDT References: <218@picuxa.UUCP> Sender: news@sun.uucp Lines: 16 Keywords: Turbo C > Okay, yet another problem with Turbo C (which I happen to > think is an excellent compiler :-). I have a 'C' code generator > that sometimes generates empty arrays ... > This is perfectly normal for the code generator, for reasons > to detailed to explain here. That's not a problem with Turbo C, that's a problem with your code generator. That construct is *ILLEGAL* C; check out either the K&R or ANSI C draft grammars - they clearly indicate that an initializer of "{}" is NOT valid, and that there must be at least one initializer. The fact that some compilers happen to accept it is irrelevant; that is NOT a reason why other compilers should. Turbo C is perfectly within its rights to complain. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com