Marek Polacek <mpolacek at gcc dot> changed:

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-08-10
                 CC|                            |mpolacek at gcc dot
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot> ---
Confirmed.  This patch fixes it

--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -4828,6 +4828,7 @@ c_parser_compound_statement_nostart (c_parser *parser)
   while (c_parser_next_token_is_not (parser, CPP_CLOSE_BRACE))
       location_t loc = c_parser_peek_token (parser)->location;
+      loc = expansion_point_location_if_in_system_header (loc);
       if (c_parser_next_token_is_keyword (parser, RID_CASE)
      || c_parser_next_token_is_keyword (parser, RID_DEFAULT)
      || (c_parser_next_token_is (parser, CPP_NAME)

but we'll need more general way to approach this, something like I outlined in

Reply via email to