aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-10-25 15:23:33 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-10-25 15:23:33 -0400
commitb15e280216048868aca98f2c4e3aa0b6559fd468 (patch)
tree857f81f0c7525986ca257e6a9b38905ed0accdb5 /gcc/cp
parent8145e6a0cc1742d77feea78f08a004358ec1e6ea (diff)
downloadgcc-b15e280216048868aca98f2c4e3aa0b6559fd468.zip
gcc-b15e280216048868aca98f2c4e3aa0b6559fd468.tar.gz
gcc-b15e280216048868aca98f2c4e3aa0b6559fd468.tar.bz2
* parser.c (cp_parser_sizeof_operand): Remove redundant grokdeclarator.
From-SVN: r265503
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parser.c15
2 files changed, 6 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c90d91b..27b739c 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 2533871..ebe326e 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