autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_CHECK_SIZEOF(char) should warn at autoconf time


From: Zack Weinberg
Subject: AC_CHECK_SIZEOF(char) should warn at autoconf time
Date: Sat, 26 Apr 2008 00:33:06 -0400

I see a surprising number of cases where people use AC_CHECK_SIZEOF()
on 'char', 'unsigned char', or 'signed char'.  As all of these types
are size 1 by definition, checking their size is unnecessary,
bordering on cargo-cult programming.

Would it be possible for autoconf to notice when AC_CHECK_SIZEOF has
been applied to one of these types and issue a warning?  (during the
invocation of 'autoconf' itself, not during the execution of the
configure script.)  Suggested wording:

configure.ac:NNN: warning: sizeof(char) is always one

zw




reply via email to

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