[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xalloc: missing prototype
From: |
Paul Eggert |
Subject: |
Re: xalloc: missing prototype |
Date: |
Wed, 05 Dec 2012 08:58:43 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 12/05/2012 07:34 AM, Akim Demaille wrote:
> I can't compile Bison with GCC 4.3 and 4.4 (newer ones seem to
> be happy,
When you say "can't compile", do you mean you mean the compilation
fails? The diagnostics you sent all seemed to be just warnings.
On 12/05/2012 08:41 AM, Akim Demaille wrote:
> Actually, all the similar functions in this file do have
> their prototype. See for instance xnrealloc
That's because similar functions use _GL_ATTRIBUTE_ALLOC_SIZE. Back
when that code was written the only way to do attributes portably
was to have a separate prototype. Nowadays I think we could fold
it into the declaration of the function, but that's a different
issue.
Adding _GL_ATTRIBUTE_ALLOC_SIZE ((3)) to x2nrealloc isn't right,
since its 3rd argument is a lower bound on the number of bytes
allocated, not the exact number of bytes which is what GCC wants.
If this is the only warning generated for older GCCs it might
be worth it, as a pragmatic issue, to put in the duplicate
declaration (without _GL_ATTRIBUTE_ALLOC_SIZE). Maybe if someone
else complains, say. But I'd rather encourage people
to use newer GCCs if they're enabling warnings left and right,
as older GCCs are just too buggy to be worth worrying about.
- xalloc: missing prototype, Akim Demaille, 2012/12/05
- Re: xalloc: missing prototype, Eric Blake, 2012/12/05
- Re: xalloc: missing prototype,
Paul Eggert <=
- 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
- Re: xalloc: missing prototype, Akim Demaille, 2012/12/10
- Re: xalloc: missing prototype, Paul Eggert, 2012/12/10