bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reconciliation of libsnprintfv vs. autogen


From: Bruce Korb
Subject: Re: Reconciliation of libsnprintfv vs. autogen
Date: Sun, 25 Feb 2007 14:00:12 -0800
User-agent: Thunderbird 1.5.0.8 (X11/20060911)

Bruno Haible wrote:
> The cast is a no-op anyway. Since pinfo->format is of type 'const char *'
> and pinfo->spec is of type 'char', both variants are equivalent to

I guess it is a preference issue:  I like to remember as few
special cases as absolutely possible.  There's too much to
remember as it is.  "Never dereference a cast pointer" is simple.
"never dereference a cast unless you are only changing fundamental
type attributes" is just that much more complexity.
Besides, it is the original way it was written.

> You need to cast a 'char' to 'unsigned char' only
>   - when using them as array indices,
>   - when passing them to <ctype.h> functions,

Actually, you have to cast to "int" or "unsigned int"
because you will otherwise get warnings about using
char values as an index on Solaris.  Poor design of the
ctype stuff - either way.  :(

Cheers -Bruce




reply via email to

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