repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* ru.po: Update.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wnonnull-compare-5.C
blob
8b31e6cf86e96edbf56fb6c2dc558d28ef88bf82
1
// PR c++/69902
2
// { dg-do compile }
3
// { dg-options "-Wall" }
4
5
struct A { virtual ~A (); };
6
struct B : A {};
7
8
bool
9
foo (A &a)
10
{
11
return dynamic_cast<B *>(&a) == (B *) 0; // { dg-bogus "nonnull argument" }
12
}
13
14
bool
15
bar (A &a)
16
{
17
return dynamic_cast<B *>(&a) != (B *) 0; // { dg-bogus "nonnull argument" }
18
}