diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-03-22 03:28:39 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-03-22 03:28:39 +0000 |
commit | d9b2742a3d4bfc03500e14e4e9bcc7ae9275a079 (patch) | |
tree | f2f70c0a43139b7fcdfc3aeacf5ad628d08890c3 /gcc/cp | |
parent | bea41393885329698043d1b7a22cb3e7a8791031 (diff) | |
download | gcc-d9b2742a3d4bfc03500e14e4e9bcc7ae9275a079.zip gcc-d9b2742a3d4bfc03500e14e4e9bcc7ae9275a079.tar.gz gcc-d9b2742a3d4bfc03500e14e4e9bcc7ae9275a079.tar.bz2 |
c-common.c: Include intl.h.
* c-common.c: Include intl.h.
(shadow_warning): Rewrite to allow better diagnostic translations.
* c-common.h: Update prototype of shadow_warning. Declare sw_kind enum.
* c-decl.c (warn_if_shadowing): Update calls to shadow_warning;
use it throughout.
* Makefile.in (c-common.o): Add intl.h.
cp:
* decl.c: Update calls to shadow_warning.
po:
* gcc.pot: Regenerate.
From-SVN: r64699
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 46 | ||||
-rw-r--r-- | gcc/cp/decl.c | 9 |
2 files changed, 31 insertions, 24 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2546ea1..616078a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2003-03-21 Zack Weinberg <zack@codesourcery.com> + + * decl.c: Update calls to shadow_warning. + 2003-03-21 Nathan Sidwell <nathan@codesourcery.com> PR c++/9898 @@ -22,8 +26,8 @@ (init_rtti_processing): initialize unemitted_tinfo_decls varray. (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls. (emit_tinfo_decl): remove unused second parameter, add assertion - that decl hasn't already been emitted. - + that decl hasn't already been emitted. + 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org> * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return @@ -47,7 +51,7 @@ 2003-03-17 Jason Merrill <jason@redhat.com> PR c++/10091 - * typeck.c (build_class_member_access_expr): Compare + * typeck.c (build_class_member_access_expr): Compare TYPE_MAIN_VARIANTs. 2003-03-17 Mark Mitchell <mark@codesourcery.com> @@ -493,14 +497,14 @@ 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net> - * cp-tree.h (cxx_saved_binding): Declare. - (struct saved_scope): Adjust type of field 'old_binding'. - * decl.c (cxx_saved_binding_make): New macro. - (struct cxx_saved_binding): Define. - (store_bindings): Adjust prototype. Use cxx_saved_binding to save - C++ bindings. - (maybe_push_to_top_level): Adjust local variable type. - (pop_from_top_level): Likewise. + * cp-tree.h (cxx_saved_binding): Declare. + (struct saved_scope): Adjust type of field 'old_binding'. + * decl.c (cxx_saved_binding_make): New macro. + (struct cxx_saved_binding): Define. + (store_bindings): Adjust prototype. Use cxx_saved_binding to save + C++ bindings. + (maybe_push_to_top_level): Adjust local variable type. + (pop_from_top_level): Likewise. 2003-03-04 Tom Tromey <tromey@redhat.com> @@ -599,9 +603,9 @@ 2003-02-28 Aldy Hernandez <aldyh@redhat.com> - * parser.c (cp_parser_init_declarator): Revert opaque - vector_opaque_p change. - Do not include target.h. + * parser.c (cp_parser_init_declarator): Revert opaque + vector_opaque_p change. + Do not include target.h. 2003-02-28 Mark Mitchell <mark@codesourcery.com> @@ -905,7 +909,7 @@ 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu> - * decl.c: (define_label): Fix warning for return 0 instead of NULL. + * decl.c: (define_label): Fix warning for return 0 instead of NULL. 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net> @@ -1109,7 +1113,7 @@ 2003-01-29 Fariborz Jahanian <fjahanian@apple.com> - * pt.c (last_pending_template) Declare GTY(). + * pt.c (last_pending_template) Declare GTY(). 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> @@ -1234,7 +1238,7 @@ PR c++/9285 PR c++/9294 * parser.c (cp_parser_simple_declaration): Return quickly when - encountering errors. + encountering errors. 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> @@ -1508,10 +1512,10 @@ 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org> - * cfns.gperf: ANSIfy function declarations. - * cfns.h: Regenerate. - * cp-tree.h: ANSIfy function declarations. - * parser.c: ANSIfy function declarations & definitions. + * cfns.gperf: ANSIfy function declarations. + * cfns.h: Regenerate. + * cp-tree.h: ANSIfy function declarations. + * parser.c: ANSIfy function declarations & definitions. * decl.c (bad_specifiers): Fix parameter order error I introduced. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a0dba2f..99898d0 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4123,7 +4123,8 @@ pushdecl (tree x) } if (warn_shadow && !err) - shadow_warning ("a parameter", name, oldlocal); + shadow_warning (SW_PARAM, false, + IDENTIFIER_POINTER (name), oldlocal); } /* Maybe warn if shadowing something else. */ @@ -4140,11 +4141,13 @@ pushdecl (tree x) IDENTIFIER_POINTER (name)); else if (oldlocal != NULL_TREE && TREE_CODE (oldlocal) == VAR_DECL) - shadow_warning ("a previous local", name, oldlocal); + shadow_warning (SW_LOCAL, false, + IDENTIFIER_POINTER (name), oldlocal); else if (oldglobal != NULL_TREE && TREE_CODE (oldglobal) == VAR_DECL) /* XXX shadow warnings in outer-more namespaces */ - shadow_warning ("a global declaration", name, oldglobal); + shadow_warning (SW_GLOBAL, false, + IDENTIFIER_POINTER (name), oldglobal); } } |