diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2000-08-18 10:49:17 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-08-18 10:49:17 +0000 |
commit | 2ae7bada94874ae1a4c6f0b4d3c1027c38e00aea (patch) | |
tree | 5bfe74fd5b7f783f3e45ddca65fc5f3f345be76f /gcc | |
parent | e3b4d2e9a6291d9f483fca967c6c57ced98a59b2 (diff) | |
download | gcc-2ae7bada94874ae1a4c6f0b4d3c1027c38e00aea.zip gcc-2ae7bada94874ae1a4c6f0b4d3c1027c38e00aea.tar.gz gcc-2ae7bada94874ae1a4c6f0b4d3c1027c38e00aea.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/decl.c | 16 | ||||
-rw-r--r-- | gcc/cp/friend.c | 4 |
3 files changed, 18 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 16a8806..88d56b0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,7 +1,14 @@ 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 - TYPE_DECLs. + TYPE_DECLs. 2000-08-18 Nathan Sidwell <nathan@codesourcery.com> diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index e415628..c8599fa 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8705,11 +8705,11 @@ member_function_or_else (ctype, cur_type, flags) if (ctype && ctype != cur_type) { if (flags == DTOR_FLAG) - error ("destructor for alien class `%s' cannot be a member", - TYPE_NAME_STRING (ctype)); + cp_error ("destructor for alien class `%T' cannot be a member", + ctype); else - error ("constructor for alien class `%s' cannot be a member", - TYPE_NAME_STRING (ctype)); + cp_error ("constructor for alien class `%T' cannot be a member", + ctype); return 0; } return 1; @@ -11235,8 +11235,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) if (current_class_type) make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type)); else - error ("trying to make class `%s' a friend of global scope", - TYPE_NAME_STRING (type)); + cp_error ("trying to make class `%T' a friend of global scope", + type); type = void_type_node; } } @@ -14597,8 +14597,8 @@ start_method (declspecs, declarator, attrlist) { if (DECL_CONTEXT (fndecl) && TREE_CODE( DECL_CONTEXT (fndecl)) != NAMESPACE_DECL) - cp_error ("`%D' is already defined in class %s", fndecl, - TYPE_NAME_STRING (DECL_CONTEXT (fndecl))); + cp_error ("`%D' is already defined in class `%T'", fndecl, + DECL_CONTEXT (fndecl)); } return void_type_node; } diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index f4a5a57..1a4df14 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -217,8 +217,8 @@ make_friend_class (type, friend_type) is_template_friend = 1; else if (same_type_p (type, friend_type)) { - pedwarn ("class `%s' is implicitly friends with itself", - TYPE_NAME_STRING (type)); + cp_pedwarn ("class `%T' is implicitly friends with itself", + type); return; } else |