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
PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wnonnull-compare-3.C
blob
f909a0f27d91e83817f113f591b6efa1b82ffe9d
1
// PR c++/69850
2
// { dg-do compile }
3
// { dg-options "-Wnonnull-compare" }
4
5
template <typename T>
6
struct A {
7
static void foo (T *x) { x->bar (); }
8
};
9
template <typename T>
10
struct B {
11
T b;
12
void operator= (B) { A<T>::foo (&b); }
13
};
14
struct C {
15
void bar () { delete[] this; } // { dg-bogus "nonnull argument" }
16
};
17
struct D { B<C> d; };
18
struct G {
19
D g[6];
20
void baz ();
21
};
22
int a;
23
24
void
25
G::baz ()
26
{
27
g[a] = g[1];
28
}