This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix fallout from bool to char always
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 13 Jun 2004 17:40:25 -0400 (EDT)
- Subject: [committed] Fix fallout from bool to char always
The change which made be able to bootstrap again with no _Bool
vailable:
+2004-06-11 Zack Weinberg <zack@codesourcery.com>
+
+ * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
+ * configure, config.in: Regenerate.
+ * system.h: Unconditionally define bool as unsigned char,
+ BOOL_BITFIELD as unsigned int.
+ * domwalk.h: Use BOOL_BITFIELD.
caused three regressions which were caused by the C++ front-end
depending on the behavior of _Bool for bool. These would
have showed up if you had just did a cross compiler wiht 2.95.x
as the base compiler and ran the testsuite.
I committed this patch as obvious after a quick check that this
fixes the problem and a bootstrap on powerpc-apple-darwin8.0.0 (with
only C++ as java does not build on my machine for an unrelated issue
which I have not fixed yet).
Thanks,
Andrew Pinski
ChangeLog:
* decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
Patch:
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1213
diff -u -p -r1.1213 decl.c
--- decl.c 10 Jun 2004 08:08:00 -0000 1.1213
+++ decl.c 13 Jun 2004 21:32:52 -0000
@@ -7055,9 +7055,9 @@ grokdeclarator (tree declarator,
staticp = 0;
inlinep = !! RIDBIT_SETP (RID_INLINE, specbits);
- virtualp = RIDBIT_SETP (RID_VIRTUAL, specbits);
+ virtualp = !! RIDBIT_SETP (RID_VIRTUAL, specbits);
RIDBIT_RESET (RID_VIRTUAL, specbits);
- explicitp = RIDBIT_SETP (RID_EXPLICIT, specbits) != 0;
+ explicitp = !! RIDBIT_SETP (RID_EXPLICIT, specbits);
RIDBIT_RESET (RID_EXPLICIT, specbits);
if (RIDBIT_SETP (RID_STATIC, specbits))
@@ -7069,7 +7069,7 @@ grokdeclarator (tree declarator,
dname);
staticp = 0;
}
- friendp = RIDBIT_SETP (RID_FRIEND, specbits);
+ friendp = !! RIDBIT_SETP (RID_FRIEND, specbits);
RIDBIT_RESET (RID_FRIEND, specbits);
if (dependant_name && !friendp)