diff options
author | Jason Merrill <jason@redhat.com> | 2013-04-01 21:19:52 +0000 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2013-04-01 21:19:52 +0000 |
commit | 88d0e184d7d6a7980d441c0115ebcfb4d097c2d8 (patch) | |
tree | 3951c12935eff34a5f32cae94d77437b9d2c4eb3 /gcc/cp | |
parent | 38d0eaf56580faa30ac29d663b19cf75e779aeab (diff) |
PR c++/56772
* init.c (build_new): Don't try to process an array initializer
at template definition time.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@197331 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/init.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index aa6f584b093..d53ad4b2b4f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2013-04-01 Jason Merrill <jason@redhat.com> + PR c++/56772 + * init.c (build_new): Don't try to process an array initializer + at template definition time. + +2013-04-01 Jason Merrill <jason@redhat.com> + PR c++/56793 * typeck.c (finish_class_member_access_expr): Handle enum scope. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 697f11ff52e..d6ef12330e5 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2920,6 +2920,7 @@ build_new (vec<tree, va_gc> **placement, tree type, tree nelts, if (dependent_type_p (type) || any_type_dependent_arguments_p (*placement) || (nelts && type_dependent_expression_p (nelts)) + || (nelts && *init) || any_type_dependent_arguments_p (*init)) return build_raw_new_expr (*placement, type, nelts, *init, use_global_new); |