Bruno Haible <[EMAIL PROTECTED]> 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?