diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-18 20:04:01 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-18 20:04:01 +0000 |
commit | be9ec78a5e0ba875b3089584174aabe4624c047c (patch) | |
tree | 0ce66fbd7f1ed533eda7b0fb37b3023a151aae03 /gcc/testsuite/gcc.dg/Werror-11.c | |
parent | 76f02516d92d7110b13140af39499b789ea392da (diff) | |
download | gcc-be9ec78a5e0ba875b3089584174aabe4624c047c.tar.gz |
* gcc.dg/Werror-1.c, gcc.dg/Werror-2.c, gcc.dg/Werror-3.c,
gcc.dg/Werror-4.c, gcc.dg/Werror-5.c, gcc.dg/Werror-6.c,
gcc.dg/Werror-7.c, gcc.dg/Werror-8.c, gcc.dg/Werror-9.c,
gcc.dg/Werror-10.c, gcc.dg/Werror-11.c, gcc.dg/Werror-12: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109908 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/Werror-11.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/Werror-11.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Werror-11.c b/gcc/testsuite/gcc.dg/Werror-11.c new file mode 100644 index 00000000000..14aae3129f8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Werror-11.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-Wattributes -Werror" } */ +/* { dg-warning "warnings being treated as errors" "" {target "*-*-*"} 0 } */ + +/* Make sure #pragma can override -Werror. */ + +#pragma GCC diagnostic warning "-Walways-true" + +void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */ + +int i; + +void +foo () +{ + if (&i) /* { dg-warning "warning: .* will always evaluate as 'true'" } */ + grill (); +} |