From be9ec78a5e0ba875b3089584174aabe4624c047c Mon Sep 17 00:00:00 2001 From: dj Date: Wed, 18 Jan 2006 20:04:01 +0000 Subject: * 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 --- gcc/testsuite/gcc.dg/Werror-3.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/Werror-3.c (limited to 'gcc/testsuite/gcc.dg/Werror-3.c') diff --git a/gcc/testsuite/gcc.dg/Werror-3.c b/gcc/testsuite/gcc.dg/Werror-3.c new file mode 100644 index 00000000000..a994714446c --- /dev/null +++ b/gcc/testsuite/gcc.dg/Werror-3.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-Walways-true -Wattributes" } */ + +/* Make sure the command line option enables the warning. */ + +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 (); +} -- cgit v1.2.1