From: Robert Hoehne Newsgroups: comp.os.msdos.djgpp Subject: Re: New to djgpp -- curious compilation problem Date: Wed, 22 Jan 1997 11:13:57 +0100 Organization: TU Chemnitz-Zwickau Lines: 22 Message-ID: <32E5E865.57FF@Mathematik.tu-chemnitz.de> References: NNTP-Posting-Host: env.hrz.tu-chemnitz.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Alan Bostick wrote: > > have discovered, when compiling his examples, that djgpp chokes on the > following construction: > enum Boolean {false = 0, true}; It is not DJGPP but gcc which complains the above. The reason: 'false' and 'true' are reserved words in gcc of the new type 'bool'. If you realy want to declare your own Boolean type, use any other (not reserved) words. But I think the better way is to use the 'bool' type, because it is stored as a single byte but an 'enum' is stored (mostly) as an int (4 bytes). Robert -- ***************************************************************** * Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau * * Post: Am Berg 3, D-09573 Dittmannsdorf * * e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE * * WWW: http://www.tu-chemnitz.de/~rho * *****************************************************************