Commit 452a394b by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (add_method): Change prototype.

	* cp-tree.h (add_method): Change prototype.
	* class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
	Don't double the size of the method vector in the error case.
	(handle_using_decl): Adjust call to add_method.
	(add_implicitly_declared_members): Likewise.
	(clone_function_decl): Likewise.
	* decl2.c (check_classfn): Likewise.
	* semantics.c (finish_member_declaration): Likewise.

From-SVN: r35490
parent ca2eed21
2000-08-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (add_method): Change prototype.
* class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
Don't double the size of the method vector in the error case.
(handle_using_decl): Adjust call to add_method.
(add_implicitly_declared_members): Likewise.
(clone_function_decl): Likewise.
* decl2.c (check_classfn): Likewise.
* semantics.c (finish_member_declaration): Likewise.
2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (flag_isoc94): New variable.
......
......@@ -3805,7 +3805,7 @@ extern tree build_vbase_path PARAMS ((enum tree_code, tree, tree, tree, int));
extern tree build_vtbl_ref PARAMS ((tree, tree));
extern tree build_vfn_ref PARAMS ((tree *, tree, tree));
extern tree get_vtable_decl PARAMS ((tree, int));
extern void add_method PARAMS ((tree, tree *, tree));
extern void add_method PARAMS ((tree, tree, int));
extern int currently_open_class PARAMS ((tree));
extern tree currently_open_derived_class PARAMS ((tree));
extern tree get_vfield_offset PARAMS ((tree));
......
......@@ -1549,7 +1549,7 @@ check_classfn (ctype, function)
case we'll only confuse ourselves when the function is declared
properly within the class. */
if (COMPLETE_TYPE_P (ctype))
add_method (ctype, methods, function);
add_method (ctype, function, /*error_p=*/1);
return NULL_TREE;
}
......
......@@ -1969,7 +1969,7 @@ finish_member_declaration (decl)
{
/* We also need to add this function to the
CLASSTYPE_METHOD_VEC. */
add_method (current_class_type, 0, decl);
add_method (current_class_type, decl, /*error_p=*/0);
TREE_CHAIN (decl) = TYPE_METHODS (current_class_type);
TYPE_METHODS (current_class_type) = decl;
......
// Build don't link:
// Origin: Gabriel Dos Reis <gdr@codesourcery.com>
struct A {
virtual void f(int&) const;
};
struct B : public A {
int x;
};
void B::f(int& t)
{
x = t;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment