PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / Werror-1.c
blob88553e7a158d9c1c32a04e313fbeeef3b759611b
1 /* { dg-do compile } */
2 /* { dg-options "-Waddress -Wattributes -Werror -fshow-column" } */
3 /* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
5 /* This is the first in a series of test cases that test the
6 interaction between -Wfoo, -Werror, -Werror=foo, and #pragma GCC
7 diagnostic error foo. This one has all the bits we're testing, the
8 others are subsets of this one. */
10 #pragma GCC diagnostic error "-Waddress"
12 void grill ();
13 void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
15 int i;
17 void
18 foo ()
20 if (&i) /* { dg-error "7:.* will always evaluate as 'true'" } */
21 grill ();