aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 202f3b6..a6da19f 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;