diff options
author | Joseph Myers <josmyers@redhat.com> | 2024-11-19 21:31:24 +0000 |
---|---|---|
committer | Joseph Myers <josmyers@redhat.com> | 2024-11-19 21:31:24 +0000 |
commit | 933b146f0aac96b05cd5a7518929843f72c8b64a (patch) | |
tree | de675557e66d73fe0b875fac8699b3ab9ff23dad /gcc/fortran | |
parent | b222ee10045db06655d2a9f0d87e25c5083d98c8 (diff) | |
download | gcc-933b146f0aac96b05cd5a7518929843f72c8b64a.zip gcc-933b146f0aac96b05cd5a7518929843f72c8b64a.tar.gz gcc-933b146f0aac96b05cd5a7518929843f72c8b64a.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions