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
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wnonnull-compare-8.C
blob
28dcac872add57e6edccc06044b8e19d3dee37f0
1
// PR c++/70295
2
// { dg-do compile }
3
// { dg-options "-O2 -Wnonnull-compare" }
4
5
struct A { A (); virtual ~A (); bool foo (bool); };
6
struct B : virtual public A { B (); virtual ~B (); };
7
8
bool
9
A::foo (bool x)
10
{
11
if (x && dynamic_cast<B *>(this) != (B *) 0) // { dg-bogus "nonnull argument" }
12
return true;
13
return false;
14
}