Commit a182b26d by Joseph Myers Committed by Joseph Myers

* gcc.dg/pr12625-1.c: New test.

From-SVN: r84953
parent b396053c
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.
......
/* 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" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment