This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: alloca (0) in include/libiberty.h


Hi,

On Tue, 11 Jun 2019, Martin Liška wrote:

> I see 3 occurrences of the alloca (0) in libiberty/regex.c, but there are properly
> guarded within:
> 
> # ifdef C_ALLOCA
>       alloca (0);
> # endif
> 
> and then I noticed 2 more occurrences in gdb that break build right now:
> 
> gdb/regcache.c:  alloca (0);
> gdb/top.c:  alloca (0);
> 
> Is it the right approach to remove these 2 in gdb?

It's more an indication that the annotation requesting the warning for 
unused results is simply overeager (aka wrong) for alloca.  (sure, the 
uses in gdb probably could be cleaned up as well, but that doesn't affect 
the wrongness of the warning).


Ciao,
Michael.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]