[Bug gdb/34308] p sizeof(bool) gets an error

vries at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Mon Jun 22 10:52:30 GMT 2026


https://sourceware.org/bugzilla/show_bug.cgi?id=34308

Tom de Vries <vries at gcc dot gnu.org> changed:

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
GDB just uses the type the compiler tells it to use:
...
$ gcc -g3 -gdwarf-5 test.c -std=c23
$ readelf -wi a.out | grep -i bool
    <d2>   DW_AT_encoding    : 2        (boolean)
    <d3>   DW_AT_name        : (indirect string, offset: 0x13fb): _Bool
$ clang -g3 -gdwarf-5 test.c -std=c23
$ readelf -wi a.out | grep -i bool
    <90>   DW_AT_name        : (indexed string: 0xc): bool
    <91>   DW_AT_encoding    : 2        (boolean)
...

I've filed a GCC PR ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125935 ).

I propose to close this as resolved-moved.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list