Commit 93fd0aad by Martin Sebor Committed by Martin Sebor

PR c/69661 - missing -Wsequence-point warning

gcc/testsuite.ChangeLog:
        * c-c++-common/Wsequence-point-2.c: New test.

From-SVN: r268504
parent 0b841214
2019-02-03 Martin Sebor <msebor@redhat.com>
PR c/69661
* c-c++-common/Wsequence-point-2.c: New test.
PR c++/44648
* g++.dg/warn/Wunused-var-35.C: New test.
......
/* PR c/69661 - missing -Wsequence-point warning
{ dg-do compile }
{ dg-options "-Wall" } */
int a, b;
short c;
void fn1 (int p) { (void)p; }
void fn2 (void)
{
fn1(a == (c &= a = b)); /* { dg-warning "\\\[-Wsequence-point\\\]" } */
}
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