aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2023-02-08 23:41:47 +0000
committerJoseph Myers <joseph@codesourcery.com>2023-02-08 23:41:47 +0000
commit53678f7f794aa3ff99d9df87c02abe1caf4ec1d3 (patch)
treed8b3bdb44374933e867320b3ef02e4b0d4126fc6 /gcc/fortran
parent1a49390f3f6febc1f5539f76459c416dba83b4db (diff)
downloadgcc-53678f7f794aa3ff99d9df87c02abe1caf4ec1d3.zip
gcc-53678f7f794aa3ff99d9df87c02abe1caf4ec1d3.tar.gz
gcc-53678f7f794aa3ff99d9df87c02abe1caf4ec1d3.tar.bz2
c: Update checks on constexpr pointer initializers
WG14 has agreed a change of the rules on constexpr pointer initializers, so that a (constant) null value that is not a null pointer constant is accepted in that context, rather than only accepting null pointer constants. (In particular, this means that a constexpr variable of pointer type can be used to initializer another such variable.) Remove the null pointer constant restriction in GCC, instead checking just whether the value is null. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c/ * c-typeck.cc (check_constexpr_init): Remove argument null_pointer_constant. Only check pointer initializers for being null. (digest_init): Update calls to check_constexpr_init. gcc/testsuite/ * gcc.dg/c2x-constexpr-1.c: Test initialization of constexpr pointers with null values that are not null pointer constants. * gcc.dg/c2x-constexpr-3.c: Test initialization of constexpr pointers with non-null values, not with null values that are not null pointer constants.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions