<br><font size=2 face="sans-serif">Here is what C99 says</font>
<br>
<br>
<br><font size=3 face="Times New Roman">The parameters for the integer
data types can be accessed by the following:</font>
<br><font size=3 face="Times New Roman"><i>maxint </i></font><tt><font size=3><b>INT_MAX</b></font></tt><font size=3 face="Times New Roman">,
</font><tt><font size=3><b>LONG_MAX</b></font></tt><font size=3 face="Times New Roman">,
</font><tt><font size=3><b>LLONG_MAX</b></font></tt><font size=3 face="Times New Roman">,
</font><tt><font size=3><b>UINT_MAX</b></font></tt><font size=3 face="Times New Roman">,
</font><tt><font size=3><b>ULONG_MAX</b></font></tt><font size=3 face="Times New Roman">,</font>
<br><tt><font size=3><b>ULLONG_MAX</b></font></tt>
<br><font size=3 face="Times New Roman"><i>minint </i></font><tt><font size=3><b>INT_MIN</b></font></tt><font size=3 face="Times New Roman">,
</font><tt><font size=3><b>LONG_MIN</b></font></tt><font size=3 face="Times New Roman">,
</font><tt><font size=3><b>LLONG_MIN</b></font></tt>
<br>
<br>
<br><font size=2 face="sans-serif">I don't have a Mac machine to try this,
but on UNIX gcc supports options like -mint64 that turns int into 64-bite
wide.</font>
<br>
<br><font size=2 face="sans-serif">Cheers,</font>
<br>
<br><font size=2 face="sans-serif">Jim Xia<br>
<br>
XL Fortran Compiler Test<br>
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7<br>
Phone (905) 413-3444 &nbsp;Tie-line 313-3444<br>
email: jimxia@ca.ibm.com<br>
D2/YF7/8200 /MKM<br>
<br>
</font><a href=http://www.ibm.com/software/awdtools/fortran/xlfortran><font size=2 face="sans-serif">http://www.ibm.com/software/awdtools/fortran/xlfortran</font></a>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Van Snyder &lt;Van.Snyder@jpl.nasa.gov&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">j3 &lt;j3@j3-fortran.org&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">06/29/2009 02:26 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">(j3.2006) Does C99 have an equivalent
to HUGE?</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>I have a C code in which gcc 4.4.0 on a Mac notices<br>
<br>
e_float/efx/e_float_efx.h(57) : warning: integer constant is too large
for 'long' type<br>
e_float/efx/e_float_efx.h(58) : warning: integer constant is too large
for 'long' type<br>
<br>
The code in question is:<br>
 &nbsp; &nbsp; &nbsp;static const INT64 ef_max_exp10 &nbsp; &nbsp;= static_cast&lt;INT64&gt;(+89999999999999999);<br>
 &nbsp; &nbsp; &nbsp;static const INT64 ef_min_exp10 &nbsp; &nbsp;= static_cast&lt;INT64&gt;(-89999999999999999);<br>
<br>
In Fortran, I'd probably use HUGE to initialize these constants.<br>
<br>
Does C99 have an equivalent?<br>
<br>
Van<br>
<br>
<br>
_______________________________________________<br>
J3 mailing list<br>
J3@j3-fortran.org<br>
</font></tt><a href="http://j3-fortran.org/mailman/listinfo/j3"><tt><font size=2>http://j3-fortran.org/mailman/listinfo/j3</font></tt></a><tt><font size=2><br>
</font></tt>
<br>
<br>