This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Help Request]: GSL_RANGE_CHECK_OFF ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]