This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: [Help Request]: GSL_RANGE_CHECK_OFF ?
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Raimondo Giammanco <rongten at member dot fsf dot org>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Wed, 2 Jun 2004 12:11:03 +0100
- Subject: Re: [Help Request]: GSL_RANGE_CHECK_OFF ?
- References: <1086169078.20579.65.camel@pcgiamma.vki.ac.be>
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