diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-29 15:46:14 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-29 15:46:14 +0000 |
commit | 18d113ce3dab0cc67ae9c42e916028a30afcacea (patch) | |
tree | 5929139860a43e914144595fdd522997cbcd07c9 | |
parent | 4a7c5d80ac5bfd2866adb768a5c775c1a3a8c97c (diff) | |
download | gcc-18d113ce3dab0cc67ae9c42e916028a30afcacea.tar.gz |
1999-08-29 08:38 -0700 Zack Weinberg <zack@bitmover.com>
* stdbool.h: Make the typedef name _Bool, with bool a #defined
alias.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28972 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ginclude/stdbool.h | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f07aec89e4c..9bb892ea886 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +1999-08-29 08:38 -0700 Zack Weinberg <zack@bitmover.com> + + * stdbool.h: Make the typedef name _Bool, with bool a #defined + alias. + Sun Aug 29 09:36:50 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * tree.c (tree_code_name): Constify a char*. diff --git a/gcc/ginclude/stdbool.h b/gcc/ginclude/stdbool.h index 0baf9ce42bd..219e423992f 100644 --- a/gcc/ginclude/stdbool.h +++ b/gcc/ginclude/stdbool.h @@ -2,18 +2,21 @@ #ifndef __STDBOOL_H__ #define __STDBOOL_H__ 1 -/* The type `bool' must promote to `int' or `unsigned int'. The constants +/* The type `_Bool' must promote to `int' or `unsigned int'. The constants `true' and `false' must have the value 0 and 1 respectively. */ typedef enum { false = 0, true = 1 - } bool; + } _Bool; /* The names `true' and `false' must also be made available as macros. */ #define false false #define true true +/* The macro `bool', which may be undefined, expands to _Bool. */ +#define bool _Bool + /* Signal that all the definitions are present. */ #define __bool_true_false_are_defined 1 |