diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-07-20 15:58:02 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-07-20 15:58:02 +0100 |
commit | a182b26d35710dc0f4ffae9a878e95143e0b9d9c (patch) | |
tree | 83592a383db623caffbab3c372039d349b35c9eb | |
parent | b396053cdf755df786563d3e20183f749b1a132c (diff) | |
download | gcc-a182b26d35710dc0f4ffae9a878e95143e0b9d9c.zip gcc-a182b26d35710dc0f4ffae9a878e95143e0b9d9c.tar.gz gcc-a182b26d35710dc0f4ffae9a878e95143e0b9d9c.tar.bz2 |
* gcc.dg/pr12625-1.c: New test.
From-SVN: r84953
-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" } */ +} |