[Bug c/46902] [4.6 Regression] gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9

mrs at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 16 22:08:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902

mrs@gcc.gnu.org <mrs at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrs at gcc dot gnu.org

--- Comment #17 from mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> 2010-12-16 22:08:30 UTC ---
The code that has bool or _Bool being 1 byte is wrong, it is 4 bytes.  The host
compilers have always done this, as should all the FSF compilers.  Do you see
another other than this:

$ cat  t.c
int sz = sizeof(_Bool);
$ gcc -arch ppc t.c -S -o -
    .machine ppc7400
_sz:
    .long    4

with either the host compilers or gcc?  I'd expect that there is code that uses
char or unsigned char and expects that to be abi compatible with bool.  It
isn't.  _Bool would be however.  In sizeof expressions, one should use
sizeof(bool) instead of an explicit or implicit 1.



More information about the Gcc-bugs mailing list