This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C PATCH to remove unused block of code
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 17 Aug 2017 14:17:31 +0000
- Subject: Re: C PATCH to remove unused block of code
- Authentication-results: sourceware.org; auth=none
- References: <20170817102905.GG17069@redhat.com>
On Thu, 17 Aug 2017, Marek Polacek wrote:
> 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?
OK, with an appropriate change to the comment above the
c_parser_postfix_expression function to say that compound literals are not
handled here and callers have to call
c_parser_postfix_expression_after_paren_type on encountering them. (I've
reviewed all paths to c_parser_postfix_expression in the current parser
and don't think any of them can send compound literals to it, because
either they are parsing a specific more restricted syntax incompatible
with compond literals (OMP cases), are parsing an expression that might be
a cast expression so need to parse the (type) first to distinguish, or are
parsing a context such as sizeof where a parenthesized type name is
allowed as well as a postfix expression and again need to parse the (type)
first to distinguish.)
--
Joseph S. Myers
joseph@codesourcery.com