diff options
author | Seongbae Park <seongbae.park@gmail.com> | 2008-02-20 21:19:14 +0000 |
---|---|---|
committer | Seongbae Park <spark@gcc.gnu.org> | 2008-02-20 21:19:14 +0000 |
commit | a214518f7f23a6f5d2f81b4a4824c68488831c48 (patch) | |
tree | d6c21e69cb0b12b3fcf52d86ecdbdc5d17f346c5 /gcc/final.c | |
parent | c8910ef9e2bbec3bfcfaedcd5f79d7b40a7a79ad (diff) | |
download | gcc-a214518f7f23a6f5d2f81b4a4824c68488831c48.zip gcc-a214518f7f23a6f5d2f81b4a4824c68488831c48.tar.gz gcc-a214518f7f23a6f5d2f81b4a4824c68488831c48.tar.bz2 |
invoke.texi (Warning Options): Add new option -Wframe-larger-than=.
gcc/ChangeLog:
2008-02-20 Seongbae Park <seongbae.park@gmail.com>
* doc/invoke.texi (Warning Options): Add new option
-Wframe-larger-than=.
(-Wframe-larger-than): Document.
* flags.h (warn_frame_larger_than, frame_larger_than_size):
Add declarations for new option variables.
* final.c (final_start_function): Check the frame size
before emission and issue a Wframe-larger-than warning.
* opts.c (warn_frame_larger_than, frame_larger_than_size):
Add definitions for new option variables.
(common_handle_option): Handle new option OPT_Wframe_larger_than_.
* common.opt (Wframe-larger-than=): New option.
gcc/testsuite/ChangeLog:
2008-02-20 Seongbae Park <seongbae.park@gmail.com>
* gcc.dg/Wframe-larger-than.c: New option test.
From-SVN: r132496
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c index 12891c2..8d1cebe 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1524,6 +1524,15 @@ final_start_function (rtx first ATTRIBUTE_UNUSED, FILE *file, TREE_ASM_WRITTEN (DECL_INITIAL (current_function_decl)) = 1; } + if (warn_frame_larger_than + && get_frame_size () > frame_larger_than_size) + { + /* Issue a warning */ + warning (OPT_Wframe_larger_than_, + "the frame size of %wd bytes is larger than %wd bytes", + get_frame_size (), frame_larger_than_size); + } + /* First output the function prologue: code to set up the stack frame. */ targetm.asm_out.function_prologue (file, get_frame_size ()); |