Mail Archives: djgpp/1994/09/14/22:53:25
> Can the named enumeration be implemented in DJGPP? For example, when
>I compile the small program below:
>
> enum bool {false, true};
> void main () {
> bool foo = false;
> }
>
>the g++ told me:
>
> temp.cc:1: parse error before `bool'.
I've had the same problem compiling programs with 1.12 that compiled
ok with 1.11. It seems that gcc 2.60 supports the new data type bool
making 'bool' along with 'true' and false' reserved words. This is all
in the proposed C++ standard. The result is that the above program will
work _without_ the line "enum bool {false, true}"
Also in the proposed standard but apparently not supported by gcc 2.60
is that
bool foo=false;
foo++;
should make foo true. (Asymetrically, foo-- should not make foo false.)
Dave
- Raw text -