[Bug c/88532] variable has initializer but incomplete type

sasho648 at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Dec 17 20:01:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88532

--- Comment #2 from sasho648 at gmail dot com ---
Related points from the standard:

6.7.9 p3 states:

The type of the entity to be initialized shall be an array of unknown size or a
complete object type that is not a variable length array type.

However 6.2.5 p22 says that a structure or union type of unknown content is an
incomplete type. It is completed, for all declarations of that type, by
declaring the same structure or union tag with its defining content later in
the same scope.


@Andrew Pinski I don't think the sizeof operator introduces a new identifiers
scope.


More information about the Gcc-bugs mailing list