[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings in mingw64 builds on master
From: |
Eli Zaretskii |
Subject: |
Re: Warnings in mingw64 builds on master |
Date: |
Mon, 17 Aug 2020 19:21:39 +0300 |
> 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.
- Re: Warnings in mingw64 builds on master, (continued)
- Re: Warnings in mingw64 builds on master, Óscar Fuentes, 2020/08/16
- Re: Warnings in mingw64 builds on master, Paul Eggert, 2020/08/15
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/15
- Re: Warnings in mingw64 builds on master, Paul Eggert, 2020/08/16
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/16
- Re: Warnings in mingw64 builds on master, Paul Eggert, 2020/08/17
- Re: Warnings in mingw64 builds on master,
Eli Zaretskii <=