[Help Request]: GSL_RANGE_CHECK_OFF ?

Brian Gough bjg@network-theory.co.uk
Wed Jun 2 11:23:00 GMT 2004


Raimondo Giammanco writes:
 > Now, in /usr/include/gsl there is no mention GSL_RANGE_CHECK_OFF, only 
 > of GSL_RANGE_CHECK. Looking in the tar archive, I do find a mention
 > to GSL_RANGE_CHECK_OFF, but this recalls GSL_RANGE_CHECK.. I do not
 > really understand.

The documentation is unfortunately out of date there.  For maximum
speed use -DHAVE_INLINE=1 -DGSL_RANGE_CHECK=0 (the default) when
compiling your application.

I will try to put something in for backwards compatibility with
GSL_RANGE_CHECK_OFF.

 > On a side note, since the index is a size_t, the checking is performed
 > only to see if the requested index is bigger than the admissible value.
 > 
 > What happens if at runtime to requested index is assigned a negative
 > number? It is promoted to unsigned and therefore automatically is a
 > very big number? I know I should look elsewhere for this answer, but 
 > since this question is somehow linked to the main topic..

The warning option -Wconversion should detect that at compile-time.

-- 
Brian Gough



More information about the Gsl-discuss mailing list