[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#491654: gcc-4.3: _Bool isn't wide enough.



Package: gcc-4.3
Version: 4.3.1-6
Severity: normal

In C99, _Bool is required to map to one of the unsigned types (6.2.5/6). On
i586, this is 'unsigned char', by ABI. That means that you get eight bits to
the _Bool.

However, GCC rejects the following (admittedly unethical) snippet:

  struct S7 {
    _Bool D : 8;
  } s7 = { 1 };

with the error:

  unethical.c:2: error: width of `D' exceeds its type

Sorry GCC, no it doesn't.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.25.9 (PREEMPT)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gcc-4.3 depends on:
hi  binutils              2.18.50.20080507-1 The GNU assembler, linker and bina
ii  cpp-4.3               4.3.1-6            The GNU C preprocessor
ii  gcc-4.3-base          4.3.1-6            The GNU Compiler Collection (base 
ii  libc6                 2.7-12             GNU C Library: Shared libraries
ii  libgcc1               1:4.3.1-6          GCC support library
ii  libgomp1              4.3.1-6            GCC OpenMP (GOMP) support library

Versions of packages gcc-4.3 recommends:
ii  libc6-dev                     2.7-12     GNU C Library: Development Librari

Versions of packages gcc-4.3 suggests:
pn  gcc-4.3-doc                   <none>     (no description available)
pn  gcc-4.3-locales               <none>     (no description available)
pn  gcc-4.3-multilib              <none>     (no description available)
ii  libgcc1-dbg                   1:4.3.1-6  GCC support library (debug symbols
pn  libgomp1-dbg                  <none>     (no description available)
pn  libmudflap0-4.3-dev           <none>     (no description available)
pn  libmudflap0-dbg               <none>     (no description available)

-- no debconf information



Reply to: