repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wlogical-op-4.C
blob
745c9117a3d495486eadfda4d1ead402ac21da8a
1
// PR c++/107755
2
// { dg-do compile }
3
// { dg-options "-Wlogical-op" }
4
5
struct Foo
6
{
7
operator bool() const { return false; }
8
};
9
10
bool a;
11
Foo b;
12
13
template <typename ignored>
14
static bool Bar()
15
{
16
return (true && (false ? a : b));
17
return (false || (false ? a : b));
18
}
19
20
bool Baz()
21
{
22
return Bar<void>();
23
}