Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wnonnull8.C
blob7820b2e3b793e73a70c4de38cd461110645c4989
1 /* PR c++/96310 - Ignoring -Wnonnull via pragma gcc diagnostics still produces
2    an unwanted note
3    { dg-do compile }
4    { dg-options "-Wall" } */
6 struct C {
7   void f ();                  // { dg-message "in a call" }
8   void g ();                  // { dg-bogus "in a call" }
9 };
11 void f ()
13   static_cast<C*>(0)->f ();   // { dg-warning "\\\[-Wnonnull" }
16 void g ()
18 #pragma GCC diagnostic ignored "-Wnonnull"
19   static_cast<C*>(0)->g ();