[Bug c++/79653] [5/6/7 Regression] ICE on invalid c++ code in cp_check_const_attributes in cp/decl2.c:1423

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 22 19:32:00 GMT 2017


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

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Feb 22 19:31:49 2017
New Revision: 245657

URL: https://gcc.gnu.org/viewcvs?rev=245657&root=gcc&view=rev
Log:
        PR c++/79653
        * parser.c (cp_parser_std_attribute_spec): Don't build the attribute
        if the alignas expression is erroneous.
        * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return
        error_mark_node.

        * g++.dg/cpp0x/alignas10.C: New test.
        * g++.dg/cpp0x/alignas9.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/alignas10.C
    trunk/gcc/testsuite/g++.dg/cpp0x/alignas9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list