public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@seketeli.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Jason Merrill <jason@redhat.com>,  gcc-patches@gcc.gnu.org
Subject: Re: [C++ PATCH] -Wsizeof-pointer-memaccess warning (take 2)
Date: Wed, 03 Oct 2012 09:14:00 -0000	[thread overview]
Message-ID: <877gr7nchu.fsf@seketeli.org> (raw)
In-Reply-To: <20121002125629.GJ1787@tucnak.redhat.com> (Jakub Jelinek's	message of "Tue, 2 Oct 2012 14:56:29 +0200")

Jakub Jelinek <jakub@redhat.com> a écrit:

> --- gcc/cp/call.c.jj	2012-09-27 12:45:49.000000000 +0200
> +++ gcc/cp/call.c	2012-10-01 17:53:17.594609236 +0200
> @@ -557,7 +557,10 @@ null_ptr_cst_p (tree t)
>      {
>        /* Core issue 903 says only literal 0 is a null pointer constant.  */
>        if (cxx_dialect < cxx0x)
> -	t = integral_constant_value (t);
> +	{
> +	  t = integral_constant_value (t);
> +	  t = maybe_constant_value (t);
> +	}

Just for my education, why couldn't maybe_constant_value just call
integral_constant_value, so that we just use maybe_constant_value here?

Even after reading the comments of these two functions, /having/ to use
them like this seems confusing to the casual reader in me.

-- 
		Dodji

  reply	other threads:[~2012-10-03  9:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 19:20 [C++ PATCH] -Wsizeof-pointer-memaccess warning Jakub Jelinek
2012-09-19 13:58 ` Jason Merrill
2012-09-25 16:28   ` Jakub Jelinek
2012-10-02 12:57     ` [C++ PATCH] -Wsizeof-pointer-memaccess warning (take 2) Jakub Jelinek
2012-10-03  9:14       ` Dodji Seketeli [this message]
2012-10-03  9:43         ` Jakub Jelinek
2012-10-05 13:45       ` Jason Merrill
2012-10-11  0:41       ` Hans-Peter Nilsson
2012-10-11 11:54         ` Committed, PR54897 (was: [C++ PATCH] -Wsizeof-pointer-memaccess warning (take 2)) Hans-Peter Nilsson
2012-10-26 13:36       ` [C++ PATCH] -Wsizeof-pointer-memaccess warning (take 2) Roman Zhuykov

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=877gr7nchu.fsf@seketeli.org \
    --to=dodji@seketeli.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    /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: link
Be 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).