[Top][All Lists]

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

Re: AC_CHECK_SIZEOF for members

From: Sam Steingold
Subject: Re: AC_CHECK_SIZEOF for members
Date: Thu, 12 May 2005 09:53:02 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

> * Allan Clark <address@hidden> [2005-05-12 17:15:49 +0800]:
> Paul Eggert wrote:
>>Sam Steingold <address@hidden> 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.

yes.  meaningless warnings hide and devalue the important ones.

so what I did was add casts to the
a_function_expecting_32_bit_argument() and
(which are actually macros and not functions in some configurations).

Sam Steingold ( running w2k
<> <>
<> <> <>
Trespassers will be shot.  Survivors will be prosecuted.

reply via email to

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