From 26f943fd3600236b05ab91a36f7ee8f1043c07af Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Wed, 5 Dec 2001 23:20:00 +0000 Subject: c-common.c (shadow_warning): New function, moved from cp/decl.c. * c-common.c (shadow_warning): New function, moved from cp/decl.c. * c-common.h (shadow_warning): New. * c-decl.c: Include c-common.h. (warn_if_shadowing): New, broken out of pushdecl. (pushdecl): Use warn_if_shadowing. (store_parm_decls): Prevent duplicate -Wshadow warnings. cp: * decl.c: Include c-common.h. (shadow_warning): Move to c-common.c. testsuite: * gcc.dg/Wshadow-1.c: New test. From-SVN: r47701 --- gcc/c-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/c-common.h') diff --git a/gcc/c-common.h b/gcc/c-common.h index 4ab415c1f1e..33835f653db 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -330,6 +330,8 @@ extern tree walk_stmt_tree PARAMS ((tree *, extern void prep_stmt PARAMS ((tree)); extern void expand_stmt PARAMS ((tree)); extern void mark_stmt_tree PARAMS ((void *)); +extern void shadow_warning PARAMS ((const char *, + tree, tree)); /* Extra information associated with a DECL. Other C dialects extend this structure in various ways. The C front-end only uses this -- cgit v1.2.1