diff options
author | spark <spark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-12 18:31:39 +0000 |
---|---|---|
committer | spark <spark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-12 18:31:39 +0000 |
commit | aaafd660d81d50e2b1f80bed091f280c85227d65 (patch) | |
tree | f58a0ea917a7250e26da70b4e2da5c2e6db2fd99 /gcc/c.opt | |
parent | cc2af1837d7bca898fa95e8eaa28d13b48c6e6fa (diff) | |
download | gcc-aaafd660d81d50e2b1f80bed091f280c85227d65.tar.gz |
ChangeLog:
2007-03-12 Seongbae Park <seongbae.park@gmail.com>
* gcc/doc/invoke.texi (Wvla): New warning.
gcc/ChangeLog:
2007-03-12 Seongbae Park <seongbae.park@gmail.com>
* c-decl.c (warn_variable_length_array): New function.
Refactored from grokdeclarator to handle warn_vla
and handle unnamed array case.
(grokdeclarator): Refactored VLA warning case.
* c.opt (Wvla): New flag.
gcc/cp/ChangeLog:
2007-03-12 Seongbae Park <seongbae.park@gmail.com>
* decl.c (compute_array_index_type): New warning flag warn_vla.
gcc/testsuite/ChangeLog:
2007-03-12 Seongbae Park <seongbae.park@gmail.com>
* gcc.dg/wvla-1.c: New test
* gcc.dg/wvla-2.c: New test
* gcc.dg/wvla-3.c: New test
* gcc.dg/wvla-4.c: New test
* gcc.dg/wvla-5.c: New test
* gcc.dg/wvla-6.c: New test
* gcc.dg/wvla-7.c: New test
* g++.dg/warn/Wvla-1.C: New test
* g++.dg/warn/Wvla-2.C: New test
* g++.dg/warn/Wvla-3.C: New test
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122851 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c.opt')
-rw-r--r-- | gcc/c.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c.opt b/gcc/c.opt index 3fb36867aae..928e8b2c59a 100644 --- a/gcc/c.opt +++ b/gcc/c.opt @@ -450,6 +450,10 @@ Wvariadic-macros C ObjC C++ ObjC++ Warning Do not warn about using variadic macros when -pedantic +Wvla +C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning +Warn if a variable length array is used + Wwrite-strings C ObjC C++ ObjC++ Var(warn_write_strings) Warning In C++, nonzero means warn about deprecated conversion from string literals to `char *'. In C, similar warning, except that the conversion is of course not deprecated by the ISO C standard. |