From aaf7e7915050e19f8ac64014948f0de324a60909 Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 25 Oct 2018 19:23:33 +0000 Subject: [PATCH] * parser.c (cp_parser_sizeof_operand): Remove redundant grokdeclarator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265503 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 15 +-------------- 2 files changed, 6 insertions(+), 14 deletions(-) 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 -- 2.11.4.GIT