nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] char args passed to isalpha() et al.

2007-04-11 09:12:57

the essential crock was C having "char" be anything other than "unsigned"
(or more accurately "unsigned int8" or "uint8")

if you want an 8-bit int, then support "int8" (along with the 
missing (int16 int32 and int64 types). an implementation should
be free to bind "int", "long", and "long long" to whatever is convenient
on the compilation target (one could even make the bindings adjustable
via a pragma, or or better yet, a command line argument to the compiler
if you really wanna be perverse)

the coding standards i've used for projects outlaw using raw "int"
declarations. one uses int8, int16, int32, int64, etc. true, C won't
do range checking at run-time,  but it makes the programmer think
at least once about the range of an integer value.

the Buddah Nature of C is that one *is* concerned with the byte size
of an integer at least as often as not. although it's way too late
to fix in "official C", this is one public service that "gcc"
could provide.  the fact it's not too hard to define the "standard C types"
in terms of this new model should make it possible to adopt for
at least new code.

        -mo


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>