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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.7.4
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|                            |2016-07-09
                 CC|                            |msebor at gcc dot gnu.org
             Blocks|                            |58601
     Ever confirmed|0                           |1
            Summary|ICE on invalid C++11 code   |[5/6/7 regression] ICE on
                   |(incorrect argument for     |invalid C++11 code
                   |alignas): unexpected        |(incorrect argument for
                   |expression ‘f<int>’ of kind |alignas): unexpected
                   |template_id_expr            |expression ‘f<int>’ of kind
                   |                            |template_id_expr
      Known to fail|                            |4.8.5, 4.9.3, 5.3.0, 6.1.0,
                   |                            |7.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed with r193029 committed in the GCC 4.8.0 release as the likely root
cause of the ICE.

r193029 | dodji | 2012-10-31 04:55:43 -0400 (Wed, 31 Oct 2012) | 25 lines

PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration

In this PR, g++ embarrassingly fails to parse the simple alignas
expression below:

    alignas(double) int f;

even though the simple-declaration production in Clause 7 suggests
otherwise.

Fixed thus and tested on x86_64-unknown-linux-gnu against trunk.

gcc/cp

        PR c++/54955
        * parser.c (cp_nth_tokens_can_be_std_attribute_p): Recognize the
        'Alignas' keyword as the beginning of a c++11 attribute specifier.
        Update the comment of the function.
        (cp_next_tokens_can_be_gnu_attribute_p): Update the comment of the
        function.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58601
[Bug 58601] [meta-bug] alignas

Reply via email to