nmh-workers
[Top][All Lists]
Advanced

[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 15:41:27 -0500

>If it turns out that we can't detect it, we should prevent
>it.  Macros might be ugly but are better than relying on
>programmer discipline.

FWIW, on my cross-compile NetBSD environment, I see the following when
we give isdigit() a bare char:

t.c: In function 'main':
t.c:11: warning: array subscript has type 'char'

(t.c is a simple test program I cooked up).

So I can at least make sure nothing is missed in the initial conversion.

>To detect it, we could incorporate Tom's approach, say, into
>debug builds.  (That brings up another question, assert(),
>but for another day.)  Or add a configure option to enable
>it.

Sounds reasonable to me.

--Ken



reply via email to

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