[Bug c++/102201] Accepts invalid C++98 with nested class and sizeof of outer's non-static field

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 6 16:03:45 GMT 2021


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It's accepted since:

    C++ DR 613

            C++ DR 613
            * semantics.c (finish_non_static_data_member): Allow such
references
            without an associated object in sizeof/decltype/alignof.

    From-SVN: r145375

(and SVN r145620 on the gcc-4.4 branch).

Presumably treating it as a DR was intentional.


More information about the Gcc-bugs mailing list