bug-gnulib
[Top][All Lists]
Advanced

[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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]