AC_CHECK_SIZEOF(char) should warn at autoconf time

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

 



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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux