From be8db1e1dd96aaf57bcf1b0603074123c4c3df40 Mon Sep 17 00:00:00 2001 From: mmitchel Date: Sun, 6 Sep 1998 19:45:16 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22304 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/lang-options.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/cp/lang-options.h') diff --git a/gcc/cp/lang-options.h b/gcc/cp/lang-options.h index 32f5ff90509..c5aecb84649 100644 --- a/gcc/cp/lang-options.h +++ b/gcc/cp/lang-options.h @@ -101,6 +101,8 @@ DEFINE_LANG_NAME ("C++") { "-fno-weak", "" }, { "-fxref", "Emit cross referencing information" }, { "-fno-xref", "" }, + { "-fdiag-codes", "Show code numbers when printing diagnostics" }, + { "-fno-diag-codes", "" }, { "-Wreturn-type", "Warn about inconsistent return types" }, { "-Wno-return-type", "" }, @@ -126,4 +128,6 @@ DEFINE_LANG_NAME ("C++") { "-Wno-old-style-cast", "" }, { "-Wnon-template-friend", "" }, { "-Wno-non-template-friend", "Don't warn when non-templatized friend functions are declared within a template" }, + { "-Wnumber-" }, + { "-Wno-number-" }, -- cgit v1.2.3