diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/init.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eab41cfd03c..235f7cb4b25 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2008-01-22 Tom Tromey <tromey@redhat.com> + + PR c++/34829: + * init.c (build_new_1): Only disallow Java aggregates. + 2008-01-22 Jakub Jelinek <jakub@redhat.com> PR c++/34607 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 202f3b68ebb..a6da19f1933 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1,6 +1,6 @@ /* Handle initialization things in C++. Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) @@ -1786,7 +1786,7 @@ build_new_1 (tree placement, tree type, tree nelts, tree init, (alloc_fn, build_tree_list (NULL_TREE, class_addr))); } - else if (TYPE_FOR_JAVA (elt_type)) + else if (TYPE_FOR_JAVA (elt_type) && IS_AGGR_TYPE (elt_type)) { error ("Java class %q#T object allocated using placement new", elt_type); return error_mark_node; |