diff options
| author | David Chisnall <csdavec@swan.ac.uk> | 2012-03-16 12:15:37 +0000 |
|---|---|---|
| committer | David Chisnall <csdavec@swan.ac.uk> | 2012-03-16 12:15:37 +0000 |
| commit | 07518f249f919b6bb7985018109cc45d99018fc8 (patch) | |
| tree | 6c58409c2c5575dacbf93dc3cccda00159bfc94a /clang/test | |
| parent | 8a5070213ad10bb9840e3329533333c23188361d (diff) | |
| download | bcm5719-llvm-07518f249f919b6bb7985018109cc45d99018fc8.tar.gz bcm5719-llvm-07518f249f919b6bb7985018109cc45d99018fc8.zip | |
Warn on flexible array members when in C89 mode, with -pedantic.
This fixes PR 4307.
Patch by Eitan Adler!
llvm-svn: 152918
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/c89.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/c89.c b/clang/test/Sema/c89.c index ac8c6e0b7b7..25a10481e92 100644 --- a/clang/test/Sema/c89.c +++ b/clang/test/Sema/c89.c @@ -90,4 +90,6 @@ void test16() { printg("Hello, world!\n"); /* expected-warning {{implicit declaration of function 'printg'}} */ } +struct x { int x,y[]; }; /* expected-warning {{Flexible array members are a C99-specific feature}} */ + void main() {} /* expected-error {{'main' must return 'int'}} */ |

