This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] vfprint: validate nargs and argument-based offsets


On Thu, Feb 2, 2012 at 1:01 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> + Âif (sizeof(long) == 4)
>
> We eschew implicit "int", i.e. use "long int" instead of "long".
>
> Contrary to what Ryan said, I think it's generally preferable to use if
> rather than #if whenever you can. ÂThat avoids compile-time bit rot in the
> code path that someone doesn't remember to update and doesn't always test.

Good to know your thoughts on this going forward.  I actually grepped
through the source and didn't find any tests with precedence for a
runtime check but I'll do/recommend this in the future.

Ryan S. Arnold


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