Issue 1097: Incomplete internal linkage tentative definitions completed in inner scope

Authors: Joseph Myers
Date: 2026-08-27
Submitted against: C2Y (N3886 draft)
Status: Open

As noted in reflector message 34118, the adoption of N3347, with wording taken from reflector message 26758, left an ambiguously worded constraint. 6.9.3 (External object definitions) paragraph 1 says:

If the declaration of an identifier for an object is a tentative definition with incomplete type and internal linkage, the type of the object shall be completed before the end of the translation unit.

Suppose the type is completed in an inner scope:

static int a[];
void f() { extern int a[1]; }

Is this valid, because the type gets completed in an inner scope before the end of the translation unit, or invalid, because the type at the end of the translation unit is incomplete even though the type inside f at the end of that function is complete?