[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why AC_C_CHAR_UNSIGNED?
From: |
Hallvard B Furuseth |
Subject: |
Re: Why AC_C_CHAR_UNSIGNED? |
Date: |
Wed, 25 Jun 2008 19:25:27 +0200 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Ralf Wildenhues writes:
>> 2) If signedness of char has to be known during configure time
>> AC_C_CHAR_UNSIGNED is still useful.
>
> Exactly. So the developer who decides that AC_C_CHAR_UNSIGNED is useful
> for him either cannot use autoconf -Wall any more, or is annoyed by the
> warning which is (then) wrong for him. Since this warning hints at an
> optimization rather than at a potential bug, IMVHO here a wrong warning
> is worse than no warning.
Well, it is a _potential_ bug in code which uses of the C macro defined
by AC_C_CHAR_UNSIGNED, though hopefully an unlikely one. The reason I
reacted to this in the first place was not that it can be "optimized"
away, but that the macro invades the C implementation's namespace. Some
implementation could e.g. define __CHAR_UNSIGNED__ as a boolean - 0 for
signed, 1 for unsigned. That's different from the autoconf macros that
e.g. #define const if missing, in the hope of compiling ISO C-like code
on non-ISO C compilers.
--
Hallvard
- Re: Why AC_C_CHAR_UNSIGNED?, (continued)
- Re: Why AC_C_CHAR_UNSIGNED?, Andreas Schwab, 2008/06/25
- Re: Why AC_C_CHAR_UNSIGNED?, Stepan Kasal, 2008/06/26
- Re: Why AC_C_CHAR_UNSIGNED?, Ralf Wildenhues, 2008/06/26
- Re: Why AC_C_CHAR_UNSIGNED?, Stepan Kasal, 2008/06/26
- Re: Why AC_C_CHAR_UNSIGNED?, Hallvard B Furuseth, 2008/06/28
- Re: Why AC_C_CHAR_UNSIGNED?, Bob Friesenhahn, 2008/06/26
- Re: Why AC_C_CHAR_UNSIGNED?, Stepan Kasal, 2008/06/26
- Re: Why AC_C_CHAR_UNSIGNED?, Bob Friesenhahn, 2008/06/26
- Re: Why AC_C_CHAR_UNSIGNED?, Russ Allbery, 2008/06/26
- Re: Why AC_C_CHAR_UNSIGNED?, Ralf Wildenhues, 2008/06/25
- Re: Why AC_C_CHAR_UNSIGNED?,
Hallvard B Furuseth <=
- Re: Why AC_C_CHAR_UNSIGNED?, Ralf Wildenhues, 2008/06/25