PR opt/4330
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Apr 2002 22:39:51 +0000 (22:39 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Apr 2002 22:39:51 +0000 (22:39 +0000)
commit8d58a5a7900f5543f186d868d265d75be0f09cdc
treefd1d1d700f54be42454fcc88e95011014edff3f4
parentd1f6c8f2a0903dd9e0f7e63a40afb5073829dca3
    PR opt/4330
        * langhooks.h (lang_hooks.decls.warn_unused_global): New.
        * toplev.c (check_global_declarations): Use it.
        * langhooks-def.h (lhd_warn_unused_global_decl): Declare.
        (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
        (LANG_HOOKS_DECLS): Add it.
        * langhooks.c (lhd_warn_unused_global_decl): New.
        * c-decl.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
        * c-objc-common.c (c_warn_unused_global_decl): New.
        * c-tree.h (c_warn_unused_global_decl): Declare.
        * objc/objc-lang.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.

        * cp-lang.c (cxx_warn_unused_global_decl): New.
        (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.

* g++.dg/warn/Wunused-2.C: New.
* gcc.dg/unused-4.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51818 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/ChangeLog
gcc/c-lang.c
gcc/c-objc-common.c
gcc/c-tree.h
gcc/cp/ChangeLog
gcc/cp/cp-lang.c
gcc/langhooks-def.h
gcc/langhooks.c
gcc/langhooks.h
gcc/objc/objc-lang.c
gcc/testsuite/g++.dg/warn/Wunused-2.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/unused-4.c [new file with mode: 0644]
gcc/toplev.c