PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / warn / nonnull3.C
blobd82fa31d957dbdfd5866a36f9ade82847f0261e5
1 // PR c++/68653
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wall" }
5 struct B;
6 struct A {
7   template <typename T> __attribute__((nonnull)) bool foo (int T::*);
8   void bar (B *);
9 };
11 template <typename T> bool A::foo (int T::*p)
13   return p;
15 void A::bar (B *)
17   foo ((int B::*) nullptr);
19 // { dg-warning "nonnull argument" "" {target "*-*-*"} 0 }