On Sat, 2 May 2026, Martin Uecker wrote: > c: Fix use of variably-modified structure/union types in nested context > [PR124985] > > If a nested function uses a variably-modified structure or union type > that depends on the enclosing context, it needs the static chain. > My recent change missed this, because in this case no decl was used. > To address this, we now call mark_decl_used also on TYPE_STUB_DECLs. > > PR c/124985 > > gcc/c/ChangeLog: > * c-decl.cc (pushtag): Update comment. > (declspecs_add_type): Mark TYPE_STUB_DECL as used. > * c-typeck.cc (function_to_pointer_conversion): Fix grammar in > comment. > > gcc/testsuite/ChangeLog: > * gcc.dg/Wreturn-nested-3.c: New test. > * gcc.dg/pr124985.c: New test.
OK. -- Joseph S. Myers [email protected]
