This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/78341] ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: in cp_parser_std_attribute_spec, at cp/parser.c:24597)


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
   Target Milestone|---                         |7.0

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Probably just too eager assertion.
24854         cp_parser_parse_tentatively (parser);
24855         alignas_expr = cp_parser_type_id (parser);
24856   
24857         if (!cp_parser_parse_definitely (parser))
24858           {
24859             gcc_assert (alignas_expr == error_mark_node
24860                         || alignas_expr == NULL_TREE);

alignas_expr is REAL_TYPE double, but it failed to parse anyway due to the
missing '('.
Shall we just remove the assertion?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]