+2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/22508
+ * init.c (build_new_1): Check for empty candidate list.
+
2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/23191
args = tree_cons (NULL_TREE, size, placement);
/* Do name-lookup to find the appropriate operator. */
fns = lookup_fnfields (elt_type, fnname, /*protect=*/2);
+ if (fns == NULL_TREE)
+ {
+ error ("no suitable %qD found in class %qT", fnname, elt_type);
+ return error_mark_node;
+ }
if (TREE_CODE (fns) == TREE_LIST)
{
error ("request for member %qD is ambiguous", fnname);
+2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/22508
+ * g++.dg/init/new13.C: New test.
+
2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
PR c++/21166
--- /dev/null
+// PR c++/22508
+// ICE on invalid operator new
+// Origin: Flash Sheridan <flash@pobox.com>
+// { dg-do compile }
+
+struct A
+{
+ void* operator new(__SIZE_TYPE__) throw(X); // { dg-error "" }
+};
+
+A* p = new A; // { dg-error "no suitable" }