Thanks to the encouragement of Brodie Gaslam and Tomas Kalibera (private email), I was able to hack the code to avoid the warnings.

The code in question had the following structure:

    int inibits = -1, bit;
    for( j = powers; j; j >>= 1 ) ++inibits;
    memcpy(pv, pini, inibits*sizeof(*pini));


which I changed to:

    int inibits = -1, bit;
    for( j = powers; j; j >>= 1 ) ++inibits;

    int sz = inibits * sizeof(*pini);
    sz = (sz > 0) ? sz : 0;

    memcpy(pv, pini, sz);

to guard against the erroneous gcc 8.3 inference that inibits could remain at -1 if powers is zero, known to be not possible.

Best,

-Naras

On 5/11/21 3:02 PM, brodie gaslam wrote:
At the risk of only being mildly (if at all) helpful, I was able
to reproduce your warnings on Rhub, which has the same compiler,
with:

     rhub::check('cubature_2.0.4.1.tar.gz', platform='windows-x86_64-release')

Absent feedback from CRAN you could try tweaking your code so that
it does not produce those warnings while no changing behavior.
Obviously, iterating with rhub is not the easiest way to do this,
but might be easier than trying to get GCC 8.3.

For reference, you might be hitting:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88273

Maybe you knew that already but it might be useful for others to be
aware there is an actual bug that at least is in the general area
that affects GCC 8.2-8.3.

Best,

B.




On Monday, May 10, 2021, 4:01:36 PM EDT, Balasubramanian Narasimhan 
<na...@stanford.edu> wrote:





I submitted a minor update of cubature (suggesting rmarkdown for
vignettes) and received a message that the package generated warnings.
However, the warnings were noted to be untrustworthy (see email below).
I noted this in the submission comments as well as the reply to the
auto-check email.

It appears that I am unable to get beyond the auto-check service. Any
suggestions?

-Naras

-------- Forwarded Message --------

Subject:     Re: [CRAN-pretest-archived] CRAN submission cubature 2.0.4.2
Date:     Thu, 6 May 2021 12:51:37 -0700
From:     Balasubramanian Narasimhan <na...@stanford.edu>
To:     cran-submissi...@r-project.org, na...@stat.stanford.edu



Dear CRAN,

As explained in my submission comment, the warning is noted to be flaky
in the message below.

Thank you.

-Naras

On 18/03/2021 13:05, Kurt Hornik wrote:

Uwe Ligges writes:
Dear Naras,
your package cubature shows compiler warnings under Windows:
<https://cran.r-project.org/web/checks/check_results_cubature.html>
Any chance getting rid of these? Please try and resubmit.
Interestingly, r-release-macos shows this too ...
I think -Warray-bounds is known to be flaky in earlier compilers.  I do
not see this on macOS with Apple Clang 11.5 (latest for High Sierra) or
12.4 (current) and nor does Tomas for GCC 10 on Windows.



______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to