all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org
Subject: Re: Warnings in mingw64 builds on master
Date: Mon, 17 Aug 2020 19:21:39 +0300	[thread overview]
Message-ID: <83ft8lgs4s.fsf@gnu.org> (raw)
In-Reply-To: <c2404915-e179-9935-baf8-7af4cda76b91@cs.ucla.edu> (message from Paul Eggert on Sun, 16 Aug 2020 21:21:36 -0700)

> Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Sun, 16 Aug 2020 21:21:36 -0700
> 
> On 8/16/20 8:39 AM, Eli Zaretskii wrote:
> > the warning it emits has nothing to
> > do with correctness of the code.
> 
> I'm not sure I follow. Although it's true that adding __attribute__ ((malloc)) 
> does not turn formerly-incorrect code into correct code, the same thing is true 
> of other function attributes like _Noreturn. But that doesn't mean we shouldn't 
> use function attributes.

Agreed.  I'm not against function attributes in general or
__attribute__((malloc)) in particular.

> This is not simply a matter of memcpy vs memmove. In C one must constantly worry 
> about aliasing. These worries are lessened with __attribute__ ((malloc)), so the 
> attribute is typically a win.

Agreed.  I was talking about the compiler option
"-Wsuggest-attribute=malloc", not about using the function attributes
in our code.  I think including -Wsuggest-attribute=malloc in the
"normal" build just risks raising the noise level for no good reason.

So with that in mind, I went ahead and moved this warning into the set
used when --enable-gcc-warnings.



      reply	other threads:[~2020-08-17 16:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 22:37 Warnings in mingw64 builds on master Andy Moreton
2020-08-15 16:24 ` Eli Zaretskii
2020-08-15 18:48   ` Andy Moreton
2020-08-15 19:03     ` Eli Zaretskii
2020-08-15 19:39       ` Andy Moreton
2020-08-15 20:36       ` Óscar Fuentes
2020-08-16  2:31         ` Eli Zaretskii
2020-08-16 11:21           ` Andy Moreton
2020-08-16 14:44             ` Eli Zaretskii
2020-08-16 16:45               ` Óscar Fuentes
2020-08-16 17:08                 ` Eli Zaretskii
2020-08-16 15:05           ` Óscar Fuentes
2020-08-15 22:34       ` Paul Eggert
2020-08-16  2:31         ` Eli Zaretskii
2020-08-16 15:25           ` Paul Eggert
2020-08-16 15:39             ` Eli Zaretskii
2020-08-17  4:21               ` Paul Eggert
2020-08-17 16:21                 ` Eli Zaretskii [this message]

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=83ft8lgs4s.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=andrewjmoreton@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.