]> git.ipfire.org Git - thirdparty/autoconf.git/commit
AC_C_CHAR_UNSIGNED: Remove check of $GCC.
authorZack Weinberg <zackw@panix.com>
Mon, 30 Nov 2020 15:49:35 +0000 (10:49 -0500)
committerZack Weinberg <zackw@panix.com>
Mon, 30 Nov 2020 16:45:25 +0000 (11:45 -0500)
commit9e8bc1bffcd8a1de54b05b24717113263a45f0c5
treef7bdbe04e4466000e72db82fc66769c67722f1dd
parent0cfa111eba910a1467bc74b962a2356898284556
AC_C_CHAR_UNSIGNED: Remove check of $GCC.

On systems where plain ‘char’ is unsigned (e.g. AIX) we would define
__CHAR_UNSIGNED__ only when $GCC was not true at configure time.
If AC_LANG([C++]) has been in effect since the beginning of the
script (so AC_PROG_CC was never invoked), $GCC will be false
regardless; this causes an inconsistency between the C and C++
behaviors, even when both compilers are GNU.

The point of checking $GCC here is that GCC has command line options
to override the signedness of plain ‘char’, and it predefines
__CHAR_UNSIGNED__ to indicate what the signedness actually is.
We don’t want config.h to override that.  However, there is already
a special autoheader template for __CHAR_UNSIGNED__ that prevents it
being redefined if it’s defined already, so checking $GCC at
configure time is redundant and can safely be removed.

* lib/autoconf/c.m4 (AC_C_CHAR_UNSIGNED): Do not make result depend on
  value of $GCC.  Adjust commentary.
lib/autoconf/c.m4