I've been itching to remove this code for some time now.  The comment suggests
that the code is actually unused, so I replaced the body of that "else if" with
gcc_unreachable (); and ran regtest/bootstrap and nothing broke, so I propose
to do away with it.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2017-08-17  Marek Polacek  <pola...@redhat.com>

        * c-parser.c (c_parser_postfix_expression): Remove unused code.

diff --git gcc/c/c-parser.c gcc/c/c-parser.c
index 1402ba67204..8511a8b4fe7 100644
--- gcc/c/c-parser.c
+++ gcc/c/c-parser.c
@@ -7943,28 +7943,6 @@ c_parser_postfix_expression (c_parser *parser)
          set_c_expr_source_range (&expr, loc, close_loc);
          mark_exp_read (expr.value);
        }
-      else if (c_token_starts_typename (c_parser_peek_2nd_token (parser)))
-       {
-         /* A compound literal.  ??? Can we actually get here rather
-            than going directly to
-            c_parser_postfix_expression_after_paren_type from
-            elsewhere?  */
-         location_t loc;
-         struct c_type_name *type_name;
-         c_parser_consume_token (parser);
-         loc = c_parser_peek_token (parser)->location;
-         type_name = c_parser_type_name (parser);
-         c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
-                                    "expected %<)%>");
-         if (type_name == NULL)
-           {
-             expr.set_error ();
-           }
-         else
-           expr = c_parser_postfix_expression_after_paren_type (parser,
-                                                                type_name,
-                                                                loc);
-       }
       else
        {
          /* A parenthesized expression.  */

        Marek

Reply via email to