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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <[email protected]>:

https://gcc.gnu.org/g:9d5c276dfb5f5812e0fa7b46e84beaca36295c6d

commit r17-482-g9d5c276dfb5f5812e0fa7b46e84beaca36295c6d
Author: [email protected] <[email protected]>
Date:   Wed May 13 00:48:45 2026 -0400

    c++/reflection: reject invalid annotation on class [PR123609]

    Some errors while parsing attributes on class are ignored due to tentative
    parsing, this patch redo parsing to reject it.

            PR c++/123609

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_class_head): Re-parse attributes
            that caused a tentative parsing failure.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/attr-nodiscard1.C: Adjust expected errors.
            * g++.dg/reflect/annotations19.C: New test.

    Co-authored-by: Jason Merrill <[email protected]>

Reply via email to