C++ use of bool
David Bryan
D.J.Bryan at cranfield.ac.uk
Fri May 5 12:06:22 BST 2000
In message <4qnniEANroE5EwYB at mk-net.demon.co.uk>
Tony van der Hoff <OSLib at mk-net.demon.co.uk> wrote:
> /* C++ (1998) defines bool as a keyword */
> /* CFront defines |__cplusplus| and |c_plusplus|, but not |bool| */
> #if !defined( BOOL_DEFINED ) && defined __cplusplus && !defined
> c_plusplus
> #define BOOL_DEFINED
> #endif
CFront doesn't define anything; it works on preprocessed C. OK,
I'm being a pedant :-) However, my real concern is that I have
c++ version 3.1, and this doesn't define |c_plusplus|. It
generates command lines of the form
cc -C++ -D__cplusplus -E c++.source > scrapfile
You would need to check which CPP is being used. This could be
done by checking for |__CC_NORCROFT|. However, I believe the ARM
compiler suite was derived form the Norcroft one. Does the ARM
C++ compiler define |__CC_NORCROFT|? I am tempted to request a
copy of the ARM Developer Suite evaluation CD, just to get at the
documentation.
--
David Bryan
More information about the oslib-user
mailing list