From: Joseph Myers Date: Tue, 20 Jul 2004 14:58:02 +0000 (+0100) Subject: * gcc.dg/pr12625-1.c: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a182b26d35710dc0f4ffae9a878e95143e0b9d9c;p=gcc.git * gcc.dg/pr12625-1.c: New test. From-SVN: r84953 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 51c125813d8..a45e8575c34 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-07-20 Joseph S. Myers + + * gcc.dg/pr12625-1.c: New test. + 2004-07-20 Steven Bosscher * 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 00000000000..9ad9f28897d --- /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" } */ +}