diff options
author | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-25 00:32:22 +0000 |
---|---|---|
committer | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-25 00:32:22 +0000 |
commit | 0a8d43eb8412bd18e5f999e5b665646f792ce84c (patch) | |
tree | d8d8d7c1b612ea734a24034ac62245e478be3295 /gcc/system.h | |
parent | 1cf939b94e15514881a6f288f2ed9d32a4340d9f (diff) | |
download | gcc-0a8d43eb8412bd18e5f999e5b665646f792ce84c.tar.gz |
* system.h (bool, true, false): Don't redefine as preprocessor macros
in C++.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85135 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/gcc/system.h b/gcc/system.h index dfc8b089c71..3411fc43491 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -505,18 +505,28 @@ extern int snprintf (char *, size_t, const char *, ...); and even if it is, it is liable to be buggy. This must be after all inclusion of system headers, as some of them will mess us up. */ -#undef bool -#undef true -#undef false + #undef TRUE #undef FALSE -#define bool unsigned char -#define true 1 -#define false 0 +#ifdef __cplusplus + /* Obsolete. */ +# define TRUE true +# define FALSE false +#else /* !__cplusplus */ +# undef bool +# undef true +# undef false + +# define bool unsigned char +# define true 1 +# define false 0 + + /* Obsolete. */ +# define TRUE true +# define FALSE false +#endif /* !__cplusplus */ -#define TRUE true -#define FALSE false /* Some compilers do not allow the use of unsigned char in bitfields. */ #define BOOL_BITFIELD unsigned int |