delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/22/13:33:38

From: Robert Hoehne <Robert DOT Hoehne AT Mathematik DOT tu-chemnitz DOT de>
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: <abostickE4BLn0 DOT 5EE AT netcom DOT com>
NNTP-Posting-Host: env.hrz.tu-chemnitz.de
Mime-Version: 1.0
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                       *
*****************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019