cp-error.def: New file.
authorMark Mitchell <mark@markmitchell.com>
Sun, 6 Sep 1998 19:45:16 +0000 (19:45 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 6 Sep 1998 19:45:16 +0000 (19:45 +0000)
commitd41fbd2cb8c2ead8f101826149bd73f2f60b876a
tree435801f8dbbe8801f40acefd041c50a5a7d375b5
parente04a16fbeee9504247e0d069171a627096225028
cp-error.def: New file.

* cp-error.def: New file.
* Make-lang.in (cc1plus): Add dependency on it.
* Makefile.in (CXX_TREE_H): Likewise.
* cp-tree.h (error_code): New type.
Include cp-error.def to get error codes.  Make it possible to
include cp-tree.h in errfn.c.
(enable_warning): New function.
(flag_diag_codes): New variable.
* errfn.c: Include cp-tree.h.
(cp_err_msg): New type.  Include cp-error.def to define it.
(err_msgs): New variable.
(is_warning_enabled): New function.
(cp_thing): Take an error_code, not a format string.  Output the
diagnostic code if flag_diag_codes.
(cp_error, cp_compiler_error, cp_sprintf, cp_error_at): Take
error_codes, not format strings.
(cp_warning, cp_pedwarn, cp_warning_at, cp_pedwarn_at): Likewise.
Call is_warning_enabled.
* decl2.c (flag_diag_codes): New variable.
(lang_decode_option): Handle -fdiag-codes and -Wnumber.
* lang-options.h: Add -fdiag-codes, -fno-diag-codes, and
-W-number-, and -Wno-number.
* class.c: Update all calls to error-functions.
* cvt.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* lex.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* sig.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
* xref.c: Likewise.

From-SVN: r22304
32 files changed:
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/Makefile.in
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-error.def [new file with mode: 0644]
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/errfn.c
gcc/cp/except.c
gcc/cp/expr.c
gcc/cp/friend.c
gcc/cp/init.c
gcc/cp/lang-options.h
gcc/cp/lex.c
gcc/cp/method.c
gcc/cp/parse.c
gcc/cp/parse.y
gcc/cp/pt.c
gcc/cp/repo.c
gcc/cp/rtti.c
gcc/cp/search.c
gcc/cp/semantics.c
gcc/cp/sig.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/cp/xref.c
gcc/invoke.texi
gcc/testsuite/g++.old-deja/g++.other/warn2.C [new file with mode: 0644]