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/testsuite/gcc.dg/wvla-1.c | |
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/testsuite/gcc.dg/wvla-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/wvla-1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/wvla-1.c b/gcc/testsuite/gcc.dg/wvla-1.c new file mode 100644 index 00000000000..c8f21078be9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/wvla-1.c @@ -0,0 +1,5 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c89 -Wvla" } */ + +extern void +func (int i, int array[i]); /* { dg-warning "variable length array 'array' is used" } */ |