public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65323] [4.8/4.9/5 Regression] duplicate -Wzero-as-null-pointer-constant warnings Date: Tue, 10 Mar 2015 15:24:00 -0000 [thread overview] Message-ID: <bug-65323-4-MVzluE3Exu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65323-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65323 --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> --- I sent a patch to the mailing list about this. If we don't want to apply it and we want to be super-conservative, we can indeed simply do this, with a comment, in my opinion: @@ -11227,11 +11243,14 @@ LOOKUP_IMPLICIT); --cp_unevaluated_operand; + /* FIXME: should be OK to just check + TYPE_PTR_OR_PTRMEM_P (decl_type) && null_ptr_cst_p (arg). */ if (warn_zero_as_null_pointer_constant && TYPE_PTR_OR_PTRMEM_P (decl_type) && null_ptr_cst_p (arg) && (complain & tf_warning) - && maybe_warn_zero_as_null_pointer_constant (arg, input_location)) + && c_inhibit_evaluation_warnings == 0 + && !NULLPTR_TYPE_P (TREE_TYPE (arg))) return nullptr_node; /* [dcl.fct.default]
next prev parent reply other threads:[~2015-03-10 15:24 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-05 10:12 [Bug c++/65323] New: -Wzero-as-null-pointer-constant stutters akim.demaille at gmail dot com 2015-03-05 20:57 ` [Bug c++/65323] " paolo.carlini at oracle dot com 2015-03-05 21:04 ` paolo.carlini at oracle dot com 2015-03-06 0:17 ` [Bug c++/65323] [4.8/4.9/5 Regression] duplicate -Wzero-as-null-pointer-constant warnings paolo.carlini at oracle dot com 2015-03-09 14:43 ` rguenth at gcc dot gnu.org 2015-03-10 14:50 ` ktietz at gcc dot gnu.org 2015-03-10 15:24 ` paolo.carlini at oracle dot com [this message] 2015-03-12 23:56 ` paolo at gcc dot gnu.org 2015-03-12 23:58 ` [Bug c++/65323] [4.8/4.9 " paolo.carlini at oracle dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65323-4-MVzluE3Exu@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).