diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-10-25 19:23:33 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-10-25 19:23:33 +0000 |
commit | aaf7e7915050e19f8ac64014948f0de324a60909 (patch) | |
tree | 857f81f0c7525986ca257e6a9b38905ed0accdb5 | |
parent | fa2f0c7dbe1d24ce86db3a939c5f922b1ec496bb (diff) |
* 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
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | 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 <jason@redhat.com> + + * parser.c (cp_parser_sizeof_operand): Remove redundant use of + grokdeclarator. + 2018-10-24 Jakub Jelinek <jakub@redhat.com> 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 |