https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114831
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Uecker <uec...@gcc.gnu.org>: https://gcc.gnu.org/g:9f1798c1a93257526196a3c19828e40fb28ac551 commit r15-825-g9f1798c1a93257526196a3c19828e40fb28ac551 Author: Martin Uecker <uec...@tugraz.at> Date: Sat May 18 14:40:02 2024 +0200 c: Fix for some variably modified types not being recognized [PR114831] We did not evaluate expressions with variably modified types correctly in typeof and did not produce warnings when jumping over declarations using typeof. After addressof or array-to-pointer decay we construct new pointer types that have to be marked variably modified if the pointer target is variably modified. 2024-05-18 Martin Uecker <uec...@tugraz.at> PR c/114831 gcc/c/ * c-typeck.cc (array_to_pointer_conversion, build_unary_op): Propagate flag to pointer target. gcc/testsuite/ * gcc.dg/pr114831-1.c: New test. * gcc.dg/pr114831-2.c: New test. * gcc.dg/gnu23-varmod-1.c: New test. * gcc.dg/gnu23-varmod-2.c: New test.