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

--- Comment #2 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
The specification for underspecified declarations (auto and constexpr) says "if
anywhere within the sequence of tokens making up the declaration identifiers
that are not ordinary are declared, the behavior is implementation-defined." -
so the auto initializer can't contain a struct definition (struct members
aren't ordinary identifiers), for example. (We could reasonably remove those
errors anyway; they were added when a diagnostic was required, before it was
made implementation-defined instead. The idea of the previous requirement to
diagnose such cases was to ensure auto uses were equivalent to something that
could be expressed using typeof without enlarging scopes of tags.)

Reply via email to