<div dir="ltr"><div>&gt; ...if
the code is a no-op on all 32 bit platforms it should probably be
improved!<br><br></div><div>While the code in question can surely be improved, it wasn&#39;t/isn&#39;t a no-op on<br>systems where both time_t&#39;s and long&#39;s were/are 32-bit entities.<br><br>
&gt; This is yet another case where the code mis-uses variable sized types<br>
&gt; (long which is different on ILP32 and LP64) and could be improved.<br><br></div><div>The code in question dates back to when &quot;long&quot; was the longest integer type<br>available with all compilers (&quot;long long&quot; was not universal then).<br>
<br></div><div>        @dashdashado<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 9:47 PM, Christos Zoulas <span dir="ltr">&lt;<a href="mailto:christos@zoulas.com" target="_blank">christos@zoulas.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mar 5,  6:07pm, <a href="mailto:eggert@cs.ucla.edu">eggert@cs.ucla.edu</a> (Paul Eggert) wrote:<br>
-- Subject: Re: [tz] dead code in zic<br>
<div><div class="h5"><br>
| I suggest changing change the compiler options<br>
| to suppress the warnings, or at least to make the warnings<br>
| not cause compilation to fail.  There&#39;s nothing invalid<br>
| about a comparison that happens to always be true on the VAX.<br>
| Comparisons like that are normal and should be expected in<br>
| code that tries to be portable among a wide variety of<br>
| hardware platforms.<br>
<br>
</div></div>Yes, and ILP32 is a portable and popular platform (still).  This is<br>
not VAX specific.  As I mentioned before if you change the const<br>
variable declaration to a #define, you&#39;ll get the warning in all<br>
gcc 32 bit platforms (or if you use a gcc circa 4.1 which had code<br>
to do the constant folding more aggressively). In simple terms, if<br>
the code is a no-op on all 32 bit platforms it should probably be<br>
improved!<br>
<br>
I know how to suppress warnings (with casts for example), and how<br>
to not compile with -Werror.  What I am asking here, is if dayoff<br>
is mistyped (long instead of zic_t) and &#39;long oadd(long, long)&#39;<br>
should be &#39;zic_t oadd(zic_t, long)&#39;.<br>
<br>
This is yet another case where the code mis-uses variable sized types<br>
(long which is different on ILP32 and LP64) and could be improved.<br>
<span class="HOEnZb"><font color="#888888"><br>
christos<br>
</font></span></blockquote></div><br></div>