aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2020-11-23 23:28:58 +0000
committerJoseph Myers <joseph@codesourcery.com>2020-11-23 23:28:58 +0000
commited431431e069b59a1cfdd877134873248d8c93a6 (patch)
treec5e49f7264198cab2d44f1c950e37b9798542820 /gcc/fold-const.c
parentf38a33a2745cf9f5ce1d71162185fe39fa5f3701 (diff)
downloadgcc-ed431431e069b59a1cfdd877134873248d8c93a6.zip
gcc-ed431431e069b59a1cfdd877134873248d8c93a6.tar.gz
gcc-ed431431e069b59a1cfdd877134873248d8c93a6.tar.bz2
c: Allow comparison of pointers to complete and incomplete types for C11 [PR95630]
As noted in bug 95630, C11 removed a restriction in C99 on comparing pointers to compatible complete and incomplete types (this was one of the changes in N1439, which was largely a terminological change to make incomplete types a subset of object types rather than a different kind of type). Implement that change by using pedwarn_c99 with OPT_Wpedantic for this diagnostic. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c/ 2020-11-23 Joseph Myers <joseph@codesourcery.com> PR c/95630 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic for comparisons of complete and incomplete pointers. gcc/testsuite/ 2020-11-23 Joseph Myers <joseph@codesourcery.com> PR c/95630 * gcc.dg/c11-compare-incomplete-1.c, gcc.dg/c11-compare-incomplete-2.c, gcc.dg/c99-compare-incomplete-1.c, gcc.dg/c99-compare-incomplete-2.c: New tests.
Diffstat (limited to 'gcc/fold-const.c')
0 files changed, 0 insertions, 0 deletions