===================================================================
@@ -3223,7 +3222,7 @@ Enable @option{-Wformat} plus format checks not in
@option{-Wformat}. Currently equivalent to @samp{-Wformat
-Wformat-nonliteral -Wformat-security -Wformat-y2k}.
-@item -Wnonnull @r{(C and Objective-C only)}
+@item -Wnonnull
@opindex Wnonnull
@opindex Wno-nonnull
Warn about passing a null pointer for arguments marked as
===================================================================
@@ -510,7 +510,7 @@ C++ ObjC++ Var(warn_nonvdtor) Warning
Warn about non-virtual destructors
Wnonnull
-C ObjC Var(warn_nonnull) Warning
+C ObjC C++ ObjC++ Var(warn_nonnull) Warning
Warn about NULL being passed to argument slots marked as requiring non-NULL
Wnormalized=
===================================================================
@@ -0,0 +1,10 @@
+// PR c++/50757
+// { dg-options "-Wformat -Wno-nonnull" }
+
+extern void *f (void *__s) __attribute__ ((__nonnull__ (1)));
+
+int main()
+{
+ void* const s = 0;
+ f(s);
+}
===================================================================
@@ -0,0 +1,10 @@
+// PR c++/50757
+// { dg-options "-Wformat -Wno-nonnull" }
+
+extern void *f (void *__s) __attribute__ ((__nonnull__ (1)));
+
+int main()
+{
+ void* const s = 0;
+ f(s);
+}