public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Martin Sebor <msebor@gmail.com>, gcc-patches@gcc.gnu.org
Cc: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>,
	       Richard Biener <rguenther@suse.de>
Subject: Re: Fix PR78154
Date: Thu, 17 Nov 2016 04:57:00 -0000	[thread overview]
Message-ID: <15ea31ce-87c8-012c-e8d6-d3f0bb3d31dd@redhat.com> (raw)
In-Reply-To: <d7523c9a-b824-067c-ca20-54e41f9d90a2@gmail.com>

On 11/16/2016 05:17 PM, Martin Sebor wrote:

>>
>> (I've heard some noise in C++-land about making memcpy(0,0,0) valid, but
>> that may have just been noise)
>
> We may have read the same discussion.  It would make some things
> a little easier in C++ (and remove what most people view as yet
> another unnecessary gotcha in the language).
And that may be a reasonable thing to do.

While GCC does take advantage of the non-null attribute when trying to 
prove certain pointers must be non-null, it only does so when the magic 
flag is turned on.  There was a sense that it was too aggressive and 
that time may be necessary for folks to come to terms with what GCC was 
doing, particularly in the the memcpy (*, *, 0) case -- but I've never 
gotten the sense that happened and we've never turned that flag on by 
default.

jeff

  parent reply	other threads:[~2016-11-17  4:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 18:49 Prathamesh Kulkarni
2016-11-16 18:55 ` Jakub Jelinek
2016-11-16 20:27 ` Martin Sebor
2016-11-16 21:21   ` Marc Glisse
2016-11-17  0:17     ` Martin Sebor
2016-11-17  0:39       ` Martin Sebor
2016-11-17  4:57       ` Jeff Law [this message]
2016-11-17  8:48         ` Richard Biener
2016-11-17 15:19           ` Jeff Law
2016-11-17  8:51 ` Richard Biener
2016-11-17  9:34   ` Prathamesh Kulkarni
2016-11-17  9:54     ` Richard Biener
2016-11-18 13:03       ` Prathamesh Kulkarni
2016-11-21 10:04         ` Richard Biener
2016-11-22 10:14           ` Prathamesh Kulkarni
2016-11-22 14:53             ` Richard Biener
2016-11-23  9:35               ` Prathamesh Kulkarni
2016-11-23  9:42                 ` Richard Biener

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=15ea31ce-87c8-012c-e8d6-d3f0bb3d31dd@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=msebor@gmail.com \
    --cc=prathamesh.kulkarni@linaro.org \
    --cc=rguenther@suse.de \
    /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).