https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708
Martin Uecker <muecker at gwdg dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |muecker at gwdg dot de --- Comment #6 from Martin Uecker <muecker at gwdg dot de> --- I think your nested declaration of "extern int f(int);" has external linkage, because the declaration with internal linkage is not visible (it is hidden by the definition of the object with no linkage). So I agree this is compile-time UB and we miss the warning which we have for objects.