PR c/69661 - missing -Wsequence-point warning
gcc/testsuite.ChangeLog: * c-c++-common/Wsequence-point-2.c: New test. From-SVN: r268504
This commit is contained in:
parent
0b841214a8
commit
93fd0aad9c
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* 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\\\]" } */
|
||||
}
|
Loading…
Reference in New Issue