diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-23 06:05:20 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-23 06:05:20 +0000 |
commit | f3b70d2f6b4058cd7b374a1f6f3e1bc9b4fbd65e (patch) | |
tree | e16d681984f17ac9dd6b29a40c8e893f67bcbc22 /gcc/cp/init.c | |
parent | c7926a824cfe7ee75d14440282d6d15d83dcd6f8 (diff) | |
download | gcc-f3b70d2f6b4058cd7b374a1f6f3e1bc9b4fbd65e.tar.gz |
PR c++/9354
* init.c (build_new): Set the type of the new-expression, even
when processing_templte_decl.
PR c++/9216
* parser.c (cp_parser_primary_expression): Improve error message
for templates used in an expression context.
PR c++/8696
* parser.c (cp_parser_decl_specifier_seq): Commit to tentative
parse when encountering "typedef".
PR c++/9354
* g++.dg/parse/new1.C: New test.
PR c++/9216
* g++.dg/parse/template2.C: New test.
PR c++/9354
* g++.dg/parse/typedef2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61643 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index c82251660b9..493f9b8e918 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2024,7 +2024,8 @@ build_new (placement, decl, init, use_global_new) else t = type; - rval = build_min_nt (NEW_EXPR, placement, t, init); + rval = build_min (NEW_EXPR, build_pointer_type (type), + placement, t, init); NEW_EXPR_USE_GLOBAL (rval) = use_global_new; return rval; } |