[Bug c/124303] C23: redeclaration of struct with function pointer with const pointer to struct as argument
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jun 13 17:49:02 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124303
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Martin Uecker
<uecker@gcc.gnu.org>:
https://gcc.gnu.org/g:beca4454ff9990d8fa1ba4e7c30b18af0e6cca2b
commit r16-9089-gbeca4454ff9990d8fa1ba4e7c30b18af0e6cca2b
Author: Martin Uecker <uecker@tugraz.at>
Date: Sat Feb 28 17:12:43 2026 +0100
c: Fix recursive structure / union redeclaration with qualifiers [PR124303]
We reject correct recursive redeclarations when qualifiers are involved.
The reason is that the check is done before the variants are completed.
PR c/124303
gcc/c/ChangeLog:
* c-decl.cc (finish_struct): Check for consistency of
declarations after completing variants.
gcc/testsuite/ChangeLog:
* gcc.dg/pr124303.c: New test.
(cherry picked from commit 7c3e6df8ae01a473fba63e12efe2c82bd50ad502)
More information about the Gcc-bugs
mailing list