diff options
| -rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/pr12625-1.c | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 51c1258..a45e857 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-07-20 Joseph S. Myers <jsm@polyomino.org.uk> + + * gcc.dg/pr12625-1.c: New test. + 2004-07-20 Steven Bosscher <stevenb@suse.de> * testsuite/gcc.dg/switch-warn-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr12625-1.c b/gcc/testsuite/gcc.dg/pr12625-1.c new file mode 100644 index 0000000..9ad9f28 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr12625-1.c @@ -0,0 +1,13 @@ +/* Warning for assignment used as truth-value should apply for + bit-fields. */ +/* Origin: bug 12625 from nomura at netapp.com */ +/* { dg-do compile } */ +/* { dg-options "-Wparentheses" } */ + +static struct { int i:8; } s; + +void +foo () +{ + if (s.i = 0) ; /* { dg-warning "parentheses" "warning for bit-field" } */ +} |
