diff options
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index f5fc0d3..29bb059 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4017,3 +4017,17 @@ c_common_insert_default_attributes (decl) #undef DEF_ATTR_TREE_LIST #undef DEF_FN_ATTR } + +/* Output a -Wshadow warning MSGID about NAME, an IDENTIFIER_NODE, and + additionally give the location of the previous declaration DECL. */ +void +shadow_warning (msgid, name, decl) + const char *msgid; + tree name, decl; +{ + warning ("declaration of `%s' shadows %s", IDENTIFIER_POINTER (name), msgid); + warning_with_file_and_line (DECL_SOURCE_FILE (decl), + DECL_SOURCE_LINE (decl), + "shadowed declaration is here"); +} + |