This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50757] Cannot turn off -Wnonnull when using C++
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Oct 2011 12:23:34 +0000
- Subject: [Bug c++/50757] Cannot turn off -Wnonnull when using C++
- Auto-submitted: auto-generated
- References: <bug-50757-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50757
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-10-17
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-17 12:23:34 UTC ---
Confirmed, the diagnostic says it is controlled by -Wnonnull, but that's not a
valid option for G++
extern void *f (void *__s) __attribute__ ((__nonnull__ (1)));
int main()
{
void* const s = 0;
f(s);
}
w.cc:6:8: warning: null argument where non-null required (argument 1)
[-Wnonnull]
For G++ that warning is controlled by -Wformat/-Wno-format