[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: argp: listen to gcc warnings
From: |
Jim Meyering |
Subject: |
Re: argp: listen to gcc warnings |
Date: |
Sat, 24 Mar 2007 14:33:12 +0100 |
Bruno Haible <address@hidden> wrote:
> Eric Blake wrote:
>> Rather than use lots of casts, coreutils does this in a common header:
>>
>> /* Convert a possibly-signed character to an unsigned character. This is
>> a bit safer than casting to unsigned char, since it catches some type
>> errors that the cast doesn't. */
>> static inline unsigned char to_uchar (char ch) { return ch; }
>
> This figures better type safety (yields a warning when one passes a pointer
> instead of an integer type), at the expense of debugging (you know how
> confusing gdb behaves when you step through inline functions) and of speed
> (when using compilers which don't support 'inline').
There is no point in micro-optimizing for compilers that are so old
that they don't support 'inline'. I don't use such compilers any more.
Do you?