The literanger package is no longer passing on CRAN
(https://CRAN.R-project.org/package=literanger) due to array-bound
warnings in GCC 13.3 and 14.2 (more details below).

This _looks_ to me like one of either a) a compiler bug, b) a false
positive, or c) (very unlikely) something in the standard library
implementation.

Have others seen warnings like this recently, and if so, what have you
done about them? The warning did not appear in clang, nor with GCC
15.1.0 on CRAN's Fedora test service.

Firstly, the relevant code snippet:

/** Compute adjusted p-values using Benjamini/Hochberg method */
inline std::vector<double> adjust_pvalues(const std::vector<double> &
unadjusted) {

    const size_t n_pvalue = unadjusted.size();
    if (n_pvalue < 2) return unadjusted; /* <-- WARNING HERE */

    std::vector<double> adjusted(n_pvalue, 0);
    /* Do some other stuff */
    return adjusted;

}


Secondly, the warning (on my own machine, using GCC 13.2.0, which also
has this problem):

    inlined from ‘std::vector<double> literanger::adjust_pvalues(const
std::vector<double>&)’ at ../src/literanger/utility_math.h:99:48:
/usr/include/c++/13/bits/stl_algobase.h:437:30: warning: ‘void*
__builtin_memmove(void*, const void*, long unsigned int)’ writing
between 9 and 9223372036854775807 bytes into a region of size 8
overflows the destination [-Wstringop-overflow=]
  437 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);

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

Reply via email to