[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Compiler warnings and signed vs. unsigned char, again
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] Compiler warnings and signed vs. unsigned char, again |
Date: |
Tue, 05 Feb 2013 14:43:09 -0500 |
>I prefer the first because 1) we deal with chars that we,
>within nmh, always interpret as unsigned,
Do we? I was looking at that and _in my brief examination_ I saw that
we mostly don't do math on them, except in a few ASCII-specific cases.
But I could believe I missed it.
>Though seeing the arguments, I'm OK with the second
>approach. Especially if we get the compilers to flag
>missing casts.
I think we're going to have to do some work on that front; I don't see
how to make that happen out of the box on some systems. Tom Lane explained
how he checks for that; Tom, you willing to test out nmh on that system for
us? Also, I actually might have a NetBSD cross-compilation environment
here for me to use (I just checked; on those systems, it looks like the
ctype macros do expand to array references).
>> The only time signed vs. unsigned makes a difference is if
>> you are using chars as itty bitty ints. Are we doing
>> that?
>
>Not that I recall but I wouldn't be surprised if some are
>lurking, though I would be surprised if any of those could
>contain a value >0x7f. In any case, I agree that we should
>exterminate any chars used as ints if we find them.
I did find some of those in the format compiler, check out "struct ftable"
in fmt_compile. AFAICT that was just done to save space; there's no reason
I can tell that we need that.
--Ken
Re: [Nmh-workers] Compiler warnings and signed vs. unsigned char, again, David Levine, 2013/02/04
Re: [Nmh-workers] Compiler warnings and signed vs. unsigned char, again, David Levine, 2013/02/05
Re: [Nmh-workers] Compiler warnings and signed vs. unsigned char, again, David Levine, 2013/02/05
Re: [Nmh-workers] Compiler warnings and signed vs. unsigned char, again, David Levine, 2013/02/05
Re: [Nmh-workers] Compiler warnings and signed vs. unsigned char, again, David Levine, 2013/02/06