diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-28 20:40:55 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-28 20:40:55 +0000 |
commit | b69eb0ff67570b746f9448ced2df74c778d904e3 (patch) | |
tree | d5b0b3986f7580e9e8e84df766ad4bfe9caaa82e /gcc/cgraphunit.c | |
parent | 50ef8532a34bcbd2cfdafef300ec16a2301d9777 (diff) | |
download | gcc-b69eb0ff67570b746f9448ced2df74c778d904e3.tar.gz |
* gcc.dg/unused-6.c: New test.
PR c/15004
* function.c (do_warn_unused_parameter): Break out form ...
(expand_function_end): ... here; warn only when not using cgraphunit.
* function.h (do_warn_unused_parameter): Declare.
* cgraphunit.c: Include function.h.
(cgraph_finalize_function): Do unused parameter warning.
* Makefile.in (cgraphunit.o): Depend on function.h
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81260 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 7495a7595e5..4bdd41a5aa9 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -183,6 +183,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "fibheap.h" #include "c-common.h" #include "intl.h" +#include "function.h" #define INSNS_PER_CALL 10 @@ -377,6 +378,10 @@ cgraph_finalize_function (tree decl, bool nested) early then. */ if (DECL_EXTERNAL (decl)) DECL_STRUCT_FUNCTION (decl) = NULL; + + /* Possibly warn about unused parameters. */ + if (warn_unused_parameter) + do_warn_unused_parameter (decl); } /* Walk tree and record all calls. Called via walk_tree. */ |