aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/error.cc
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-10-23 00:10:01 +0000
committerJoseph Myers <josmyers@redhat.com>2024-10-23 00:10:01 +0000
commitecb55d94738b1ed36fa76d02e3454cc4959a141d (patch)
treea3699287a1353ba0ac5b821208fc36194518ebfb /gcc/fortran/error.cc
parent71e13ea134b04562f8f2cdd9c4a55dbb0905f96a (diff)
downloadgcc-ecb55d94738b1ed36fa76d02e3454cc4959a141d.zip
gcc-ecb55d94738b1ed36fa76d02e3454cc4959a141d.tar.gz
gcc-ecb55d94738b1ed36fa76d02e3454cc4959a141d.tar.bz2
c: Restore "originally defined" struct redefinition messages for C23
One failure with a -std=gnu23 default that indicates a quality-of-implementation regression in C23 mode is gcc.dg/pr39084.c, which loses the expected "originally defined here" message on struct redefinition errors (which occur in a different place in the front end for C23 because it is necessary to see the members of the struct to determine whether the redefinition is valid). That message seems a good thing to have both in and out of C23 mode, so add logic to restore it in the C23 case. Bootstrapped with no regressions for x86-64-pc-linux-gnu. gcc/c/ * c-decl.cc (c_struct_parse_info): Add member refloc. (start_struct): Store refloc in struct_parse_info. (finish_struct): Give "originally defined" message for C23 struct redefinition errors. gcc/testsuite/ * gcc.dg/gnu17-tag-1.c, gcc.dg/gnu23-tag-5.c: New tests.
Diffstat (limited to 'gcc/fortran/error.cc')
0 files changed, 0 insertions, 0 deletions