diff options
author | austern <austern@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-28 23:57:28 +0000 |
---|---|---|
committer | austern <austern@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-28 23:57:28 +0000 |
commit | 31c2995d302e4610bd7c93604576aa0a227a7b18 (patch) | |
tree | 7316f0b087b8604c3dce7b83450841f30b955588 /gcc/config/rs6000/darwin.h | |
parent | b27ac6b5cb2b32599e8da6730f5726f835da10a1 (diff) | |
download | gcc-31c2995d302e4610bd7c93604576aa0a227a7b18.tar.gz |
* config/darwin.c (darwin_one_byte_bool): New global variable.
* config/darwin.h (darwin_one_byte_bool): Declare.
(SUBTARGET_OPTIONS): Define macro. (for -mone-byte-bool flag.)
* config/rs6000/darwin.h (BOOL_TYPE_SIZE): Conditionalize on
value of darwin_one_byte_bool.
* doc/invoke.texi: Document -mone-byte-bool flag.
* testsuite/gcc.dg/darwin-bool-1.c: New test.
* testsuite/gcc.dg/darwin-bool-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85277 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/darwin.h')
-rw-r--r-- | gcc/config/rs6000/darwin.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index ae65eb26851..e09e86b892d 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -321,8 +321,10 @@ do { \ #define DOUBLE_INT_ASM_OP "\t.quad\t" /* For binary compatibility with 2.95; Darwin C APIs use bool from - stdbool.h, which was an int-sized enum in 2.95. */ -#define BOOL_TYPE_SIZE INT_TYPE_SIZE + stdbool.h, which was an int-sized enum in 2.95. Users can explicitly + choose to have sizeof(bool)==1 with the -mone-byte-bool switch. */ +extern const char *darwin_one_byte_bool; +#define BOOL_TYPE_SIZE (darwin_one_byte_bool ? CHAR_TYPE_SIZE : INT_TYPE_SIZE) #undef REGISTER_TARGET_PRAGMAS #define REGISTER_TARGET_PRAGMAS DARWIN_REGISTER_TARGET_PRAGMAS |