[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why AC_C_CHAR_UNSIGNED?
From: |
Hallvard B Furuseth |
Subject: |
Why AC_C_CHAR_UNSIGNED? |
Date: |
Mon, 23 Jun 2008 16:34:03 +0200 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
What's the point of the AC_C_CHAR_UNSIGNED macro?
"If the C type `char' is unsigned, define `__CHAR_UNSIGNED__',
unless the C compiler predefines it."
This is what <limits.h> is for. If you want to know if char is
unsigned, try #if CHAR_MIN == 0. I would suggest at least mentioning
that option in the doc for AC_C_CHAR_UNSIGNED.
Though you might warn about things like #if '\300 > 0, because (a) I
think the preprocessor and compiler may have different char types, and
(b) in theory you might someday meet a compiler with 16-bit char.
--
Hallvard
- Why AC_C_CHAR_UNSIGNED?,
Hallvard B Furuseth <=
- Re: Why AC_C_CHAR_UNSIGNED?, Richard Ash, 2008/06/23
- Re: Why AC_C_CHAR_UNSIGNED?, Ralf Wildenhues, 2008/06/23
- Re: Why AC_C_CHAR_UNSIGNED?, Bob Friesenhahn, 2008/06/23
- Re: Why AC_C_CHAR_UNSIGNED?, Stepan Kasal, 2008/06/24
- Re: Why AC_C_CHAR_UNSIGNED?, Ralf Wildenhues, 2008/06/24
- Re: Why AC_C_CHAR_UNSIGNED?, Stepan Kasal, 2008/06/25
- Re: Why AC_C_CHAR_UNSIGNED?, Bob Friesenhahn, 2008/06/25
- 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