[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xalloc: missing prototype
From: |
Akim Demaille |
Subject: |
Re: xalloc: missing prototype |
Date: |
Wed, 5 Dec 2012 17:41:30 +0100 |
Hi Eric!
Le 5 déc. 2012 à 17:19, Eric Blake <address@hidden> a écrit :
> I'm not sure if your patch is needed. Remember, newer gcc understands
> '#pragma GCC diagnostic push', but gcc 4.4 does not.
Actually, all the similar functions in this file do have
their prototype. See for instance xnrealloc which is
right above.
/* Change the size of an allocated block of memory P to an array of N
objects each of S bytes, with error checking. S must be nonzero. */
XALLOC_INLINE void *xnrealloc (void *p, size_t n, size_t s)
_GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
XALLOC_INLINE void *
xnrealloc (void *p, size_t n, size_t s)
{
if (xalloc_oversized (n, s))
xalloc_die ();
return xrealloc (p, n * s);
}
So it looks like the file was ready to prototype these functions.
And really, while I can understand that -Werror is a PITA for
gnulib's *.c files, I find it bizarre to accept warnings in
gnulib's public *.h files :( But then, Ok, I will use your
macro for Bison, thanks!
- xalloc: missing prototype, Akim Demaille, 2012/12/05
- Re: xalloc: missing prototype, Eric Blake, 2012/12/05
- Re: xalloc: missing prototype, Paul Eggert, 2012/12/05
- Re: xalloc: missing prototype, Akim Demaille, 2012/12/06
- Re: xalloc: missing prototype, Akim Demaille, 2012/12/07
- Re: xalloc: missing prototype, Paul Eggert, 2012/12/07
- Re: xalloc: missing prototype, Akim Demaille, 2012/12/09
- Re: xalloc: missing prototype, Paul Eggert, 2012/12/09