diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-26 22:47:23 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-26 22:47:23 +0000 |
commit | 411b684d5c659555d94f6bd0893da1da15ef157f (patch) | |
tree | 976cb2039c130b2390eb6e951531f6c229500d5a /gnu/egcs/gcc/stmt.c | |
parent | 39c42e0288ffa508378cb82d08d4718cc37f4a02 (diff) |
Add a new warning to gcc, -Wvariable-decl, which causes it to warn for
auto declarations which size are not known at compile time.
This flag will eventually be added to the kernel makefiles so that we
can rely on -Wstack-larger-than work.
ok deraadt@ mbalmer@ otto@ marco@
Diffstat (limited to 'gnu/egcs/gcc/stmt.c')
-rw-r--r-- | gnu/egcs/gcc/stmt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/stmt.c b/gnu/egcs/gcc/stmt.c index 7f8a571c4d1..26950fbafd4 100644 --- a/gnu/egcs/gcc/stmt.c +++ b/gnu/egcs/gcc/stmt.c @@ -3598,6 +3598,9 @@ expand_decl (decl) { rtx address, size; + if (warn_variable_decl) + warning ("variable-sized declaration"); + /* Record the stack pointer on entry to block, if have not already done so. */ if (thisblock->data.block.stack_level == 0) |