c++: Add test for fixed PR [PR101592]
Fixed by my c++/99701 patch. PR c++/101592 gcc/testsuite/ChangeLog: * g++.dg/warn/Wlogical-op-3.C: New test.
This commit is contained in:
parent
fbb334a6ac
commit
7c5003c687
12
gcc/testsuite/g++.dg/warn/Wlogical-op-3.C
Normal file
12
gcc/testsuite/g++.dg/warn/Wlogical-op-3.C
Normal file
@ -0,0 +1,12 @@
|
||||
// PR c++/101592
|
||||
// { dg-do compile { target c++11 } }
|
||||
// { dg-options "-O2 -Wlogical-op" }
|
||||
|
||||
decltype(nullptr) foo ();
|
||||
|
||||
bool
|
||||
bar ()
|
||||
{
|
||||
return foo () > nullptr // { dg-error "ordered comparison" }
|
||||
|| foo () < nullptr; // { dg-error "ordered comparison" }
|
||||
}
|
Loading…
Reference in New Issue
Block a user