Commit 2ae7bada by Nathan Sidwell Committed by Nathan Sidwell

decl.c (member_function_or_else): Use cp_error ...

	* decl.c (member_function_or_else): Use cp_error ... %T.
	(grokdeclarator): Likewise.
	(start_method): Likewise.
	* friend.c (make_friend_class): Use cp_pedwarn ... %T.

From-SVN: r35784
parent e3b4d2e9
2000-08-18 Nathan Sidwell <nathan@codesourcery.com> 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (member_function_or_else): Use cp_error ... %T.
(grokdeclarator): Likewise.
(start_method): Likewise.
* friend.c (make_friend_class): Use cp_pedwarn ... %T.
2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
TYPE_DECLs. TYPE_DECLs.
2000-08-18 Nathan Sidwell <nathan@codesourcery.com> 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
......
...@@ -8705,11 +8705,11 @@ member_function_or_else (ctype, cur_type, flags) ...@@ -8705,11 +8705,11 @@ member_function_or_else (ctype, cur_type, flags)
if (ctype && ctype != cur_type) if (ctype && ctype != cur_type)
{ {
if (flags == DTOR_FLAG) if (flags == DTOR_FLAG)
error ("destructor for alien class `%s' cannot be a member", cp_error ("destructor for alien class `%T' cannot be a member",
TYPE_NAME_STRING (ctype)); ctype);
else else
error ("constructor for alien class `%s' cannot be a member", cp_error ("constructor for alien class `%T' cannot be a member",
TYPE_NAME_STRING (ctype)); ctype);
return 0; return 0;
} }
return 1; return 1;
...@@ -11235,8 +11235,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) ...@@ -11235,8 +11235,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
if (current_class_type) if (current_class_type)
make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type)); make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type));
else else
error ("trying to make class `%s' a friend of global scope", cp_error ("trying to make class `%T' a friend of global scope",
TYPE_NAME_STRING (type)); type);
type = void_type_node; type = void_type_node;
} }
} }
...@@ -14597,8 +14597,8 @@ start_method (declspecs, declarator, attrlist) ...@@ -14597,8 +14597,8 @@ start_method (declspecs, declarator, attrlist)
{ {
if (DECL_CONTEXT (fndecl) if (DECL_CONTEXT (fndecl)
&& TREE_CODE( DECL_CONTEXT (fndecl)) != NAMESPACE_DECL) && TREE_CODE( DECL_CONTEXT (fndecl)) != NAMESPACE_DECL)
cp_error ("`%D' is already defined in class %s", fndecl, cp_error ("`%D' is already defined in class `%T'", fndecl,
TYPE_NAME_STRING (DECL_CONTEXT (fndecl))); DECL_CONTEXT (fndecl));
} }
return void_type_node; return void_type_node;
} }
......
...@@ -217,8 +217,8 @@ make_friend_class (type, friend_type) ...@@ -217,8 +217,8 @@ make_friend_class (type, friend_type)
is_template_friend = 1; is_template_friend = 1;
else if (same_type_p (type, friend_type)) else if (same_type_p (type, friend_type))
{ {
pedwarn ("class `%s' is implicitly friends with itself", cp_pedwarn ("class `%T' is implicitly friends with itself",
TYPE_NAME_STRING (type)); type);
return; return;
} }
else else
......
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