diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 91dafe26921..c123e53a0ea 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2000-01-19 Gabriel Dos Reis + + * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. + + * typeck2.c (incomplete_type_error): Restore previous + cp_error and cp_error_at call sequence. + 2000-01-20 Brad Lucier * class.c (dump_class_hierarchy): Make format agree with argument; diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 0acd391016c..fabece2fbf1 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4701,13 +4701,13 @@ build_unary_op (code, xarg, noconvert) if (current_class_type && TREE_OPERAND (arg, 0) == current_class_ref) /* An expression like &memfn. */ - pedwarn ("ISO C++ forbids taking the address of a" - " non-static member function to form a pointer" - " to member function. Say `&%T::%D'", base, name); + cp_pedwarn ("ISO C++ forbids taking the address of a" + " non-static member function to form a pointer" + " to member function. Say `&%T::%D'", base, name); else - pedwarn ("ISO C++ forbids taking the address of a bound" - " member function to form a pointer to member" - " function", base, name); + cp_pedwarn ("ISO C++ forbids taking the address of a bound" + " member function to form a pointer to member" + " function", base, name); } arg = build_offset_ref (base, name); diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index a07e6584a0e..ced32f8192f 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -199,8 +199,8 @@ retry: case RECORD_TYPE: case UNION_TYPE: case ENUMERAL_TYPE: - cp_error_at - ("invalid use of a forward-declared, but not defined type `%#T'", type); + cp_error ("invalid use of undefined type `%#T'", type); + cp_error_at ("forward declaration of `%#T'", type); break; case VOID_TYPE: