Paul Eggert wrote: >Sam Steingold <sds@xxxxxxx> writes: >[...] > >>the reason I want a CPP macro and not a run-time if is that the code >>will end up looking like this: >> >> if (size_of(u.ut_tv.tv_sec) = 4) >> a_function_expecting_32_bit_argument(u.ut_tv.tv_sec); >> else >> a_function_expecting_64_bit_argument(u.ut_tv.tv_sec); >> >>the result is that on _each_ platform there will be a compile-time >>warning about a wrong argument type. >> >> > >My suggestion is to fix the compiler, or get a better compiler, or >ignore the warnings. Your life is too short to waste it worrying >about incorrect compiler warnings. > > Some of us actually check our compiler warnings, and are happy about warning-free code. I won't be the first to tell you that the warning that is a real error (ie "=" used where "==" was intended) is often hidden in the middle of these warnings you tend to ignore. GCC has this behavior, but whether it's "better" than whatever you're using is subjective and probably not based solely on whether it points out user-errors that might be real errors. GCC has no "pragma -warn ..." ability to avoid warnings for a block of code, so those of us who care tend to try to make code that doesn't cause warnings, so the real warnings stand out regardless whether the end-user of the code compiles on a "better" compiler or just a more common one. Disclaimer: it still bothers me that rpcgen-generated *_xdr.c throws so many warnings. :) Allan -- You don't need to be famous to be right _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf