2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/26036
+ * typeck.c (convert_arguments): Return error_mark_node instead of
+ error_mark_list.
+ * cp-tree.h (error_mark_list): Remove declaration.
+ * decl.c (error_mark_list): Remove definition.
+ (cxx_init_decl_processing): Do not initialize error_mark_list.
+
PR c++/10385
* rtti.c (build_dynamic_cast_1): Check for invalid conversions
before calling convert_to_reference.
binfo. */
} base_kind;
-/* in decl{2}.c */
-/* A node that is a list (length 1) of error_mark_nodes. */
-extern GTY(()) tree error_mark_list;
-
/* Node for "pointer to (virtual) function".
This may be distinct from ptr_type_node so gdb can distinguish them. */
#define vfunc_ptr_type_node vtable_entry_type
static void expand_static_init (tree, tree);
static tree next_initializable_field (tree);
-/* Erroneous argument lists can use this *IFF* they do not modify it. */
-tree error_mark_list;
-
/* The following symbols are subsumed in the cp_global_trees array, and
listed here individually for documentation purposes.
/* Initially, C. */
current_lang_name = lang_name_c;
- error_mark_list = build_tree_list (error_mark_node, error_mark_node);
- TREE_TYPE (error_mark_list) = error_mark_node;
-
/* Create the `std' namespace. */
push_namespace (std_identifier);
std_node = current_namespace;
}
else
error ("too few arguments to function");
- return error_mark_list;
+ return error_mark_node;
}
}
2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/26036
+ * g++.dg/expr/call3.C: New test.
+
PR c++/10385
* g++.dg/conversion/dynamic1.C: New test.
--- /dev/null
+// PR c++/26036
+// Origin: <ben@pc-doctor.com>
+// { dg-do compile }
+
+struct A
+{
+ int i;
+};
+
+A foo(int); // { dg-error "too few arguments" }
+
+int j = foo().i; // { dg-error "at this point" }