public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "eggert at gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/56955] documentation for attribute malloc contradicts itself
Date: Wed, 21 May 2014 15:14:00 -0000	[thread overview]
Message-ID: <bug-56955-4-WYto2udgFh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56955-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955

--- Comment #18 from Paul Eggert <eggert at gnu dot org> ---
(In reply to Richard Biener from comment #16)

> void foo (int *p)
> {
>   int *q = realloc (p, sizeof (int));
>   *q = 2;
> }
> 
> may I remove the store *q = 2 as dead?

Yes, the consensus nowadays is that you can.

I'll be happy to send the proposed change to gcc-patches but would like to be
sure it's correct first.  Has this new information about realloc changed your
opinion about whether realloc can be given the malloc attribute?


  parent reply	other threads:[~2014-05-21 15:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-56955-4@http.gcc.gnu.org/bugzilla/>
2013-04-14 19:05 ` pinskia at gcc dot gnu.org
2013-04-14 19:47 ` sunfish at google dot com
2013-04-15 10:19 ` rguenth at gcc dot gnu.org
2013-04-15 14:53 ` sunfish at google dot com
2014-05-20 20:41 ` eggert at gnu dot org
2014-05-20 20:49 ` carlos at redhat dot com
2014-05-20 20:51 ` eggert at gnu dot org
2014-05-20 21:00 ` bugdal at aerifal dot cx
2014-05-21  0:31 ` eggert at gnu dot org
2014-05-21  1:26 ` sunfish at mozilla dot com
2014-05-21  4:22 ` eggert at gnu dot org
2014-05-21 12:09 ` rguenth at gcc dot gnu.org
2014-05-21 13:09 ` rguenth at gcc dot gnu.org
2014-05-21 14:33 ` sunfish at mozilla dot com
2014-05-21 15:14 ` eggert at gnu dot org [this message]
2014-05-22 14:14 ` eggert at gnu dot org
2014-05-23 10:11 ` rguenth at gcc dot gnu.org
2014-05-23 10:13 ` rguenth at gcc dot gnu.org

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-56955-4-WYto2udgFh@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: 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).