From: Jason Merrill Date: Thu, 25 Oct 2018 19:23:33 +0000 (-0400) Subject: * parser.c (cp_parser_sizeof_operand): Remove redundant grokdeclarator. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b15e280216048868aca98f2c4e3aa0b6559fd468;p=gcc.git * parser.c (cp_parser_sizeof_operand): Remove redundant grokdeclarator. From-SVN: r265503 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c90d91b7b82..27b739c7a15 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2018-10-25 Jason Merrill + + * parser.c (cp_parser_sizeof_operand): Remove redundant use of + grokdeclarator. + 2018-10-24 Jakub Jelinek PR c++/86288 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 2533871fb28..ebe326eb923 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -28167,20 +28167,7 @@ cp_parser_sizeof_operand (cp_parser* parser, enum rid keyword) /* If all went well, then we're done. */ if (cp_parser_parse_definitely (parser)) - { - cp_decl_specifier_seq decl_specs; - - /* Build a trivial decl-specifier-seq. */ - clear_decl_specs (&decl_specs); - decl_specs.type = type; - - /* Call grokdeclarator to figure out what type this is. */ - expr = grokdeclarator (NULL, - &decl_specs, - TYPENAME, - /*initialized=*/0, - /*attrlist=*/NULL); - } + expr = type; } /* If the type-id production did not work out, then we must be