[R-pkg-devel] Compiler warning using C versions of base R integrate function

Devin Incerti dev|n@|ncert| @end|ng |rom gm@||@com
Fri Nov 22 23:57:37 CET 2019


Hi Serguei and Ralf, the thoughts and suggestions are much appreciated.

Ironically, I used to use RcppNumerical to do the integration but switched
over to integrate.c because I was receiving a compiler warning and to
eliminate the dependency on RcppEigen. Do you think I should switch back to
RcppNumerical (CRAN checks make it seem like that warning has been fixed)
or use the brute force solution suggested by Serguei.

Cheers,

Devin




On Fri, Nov 22, 2019 at 5:57 AM Ralf Stubner <ralf.stubner using gmail.com> wrote:

> On Thu, Nov 21, 2019 at 7:25 PM Devin Incerti <devin.incerti using gmail.com>
> wrote:
> > I'm attempting to submit a very minor update to my package where I
> replaced
> > a deprecated C++ function with an alternative. However, I'm receiving an
> > unrelated warning "*array subscript -1 is outside array bounds of ‘double
> > [52]’ [-Warray-bounds] *" on Debian during the CRAN pre-tests. I do not
> > receive this warning on my local OS X, Ubuntu 16.04 (on Travis-CI), with
> > Win-builder, or with R-hub builder. I also did not receive this warning
> on
> > previous submissions to CRAN, but it does now show up on the most recent
> CRAN
> > checks
> > <
> http://s.bl-1.com/h/cH9zB21r?url=https://cran.r-project.org/web/checks/check_results_hesim.html
> >
>
> I cannot reproduce the warning with R 3.6.1 and GCC 9.2. It seems to
> be an R-devel + new(ish) GCC issue since it also appears on the rather
> new Windows + GCC 8 tests.
>
> [...] .
> > R source with function pointers replaced by C++ functors. These
> integration
> > functions are needed so that the package can integrate at the C++ level.
>
> Calling the integration functions from R's C API is no fun, indeed.
> Have you considered using RcppNumerical
> (https://github.com/yixuan/RcppNumerical) instead of copying code from
> R?
>
> cheerio
> ralf
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list