https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Joseph Myers <[email protected]>:

https://gcc.gnu.org/g:933b146f0aac96b05cd5a7518929843f72c8b64a

commit r15-5476-g933b146f0aac96b05cd5a7518929843f72c8b64a
Author: Joseph Myers <[email protected]>
Date:   Tue Nov 19 21:31:24 2024 +0000

    c: Do not register nullptr_t built-in type [PR114869]

    As reported in bug 114869, the C front end wrongly creates nullptr_t
    as a built-in typedef; it should only be defined in <stddef.h>.  While
    the type node needs a name for debug info generation, it doesn't need
    to be a valid identifier; use typeof (nullptr) instead, similar to how
    the C++ front end uses decltype(nullptr) for this purpose.

    Bootstrapped with no regressions for x86_64-pc-linux-gnu.

            PR c/114869

    gcc/c/
            * c-decl.cc (c_init_decl_processing): Register nullptr_type_node
            as typeof (nullptr) not nullptr_t.

    gcc/testsuite/
            * gcc.dg/c23-nullptr-5.c: Use typeof (nullptr) not nullptr_t.
            * gcc.dg/c11-nullptr-2.c, gcc.dg/c11-nullptr-3.c,
            gcc.dg/c23-nullptr-7.c: New tests

Reply via email to