-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
Example package: https://github.com/krlmlr/RcppNoInitTest.
When using no_init()
for declaring a variable with assignment, rchk (with clang 6.0 on Ubuntu 18.04) detects an error. This goes away if no_init()
is used in a copy constructor.
IntegerVector ret_bad = no_init(1); // rchk detects problem
IntegerVector ret_ok(no_init(1)); // rchk detects no problem
I have created a test package to replicate the problem.
- krlmlr/RcppNoInitTest@6856fbc: First syntax, rchk sees a problem, see
.bcheck
file - krlmlr/RcppNoInitTest@6e77a95: Second syntax, this particular rchk problem goes away (but still plenty of other problems)
- krlmlr/RcppNoInitTest@1c3af74: First syntax with Rcpp patch https://github.com/krlmlr/Rcpp/commit/5dbfca11da325a8e72a49b90ccdd1e8714f4089c, this particular rchk problem seems resolved
- krlmlr/RcppNoInitTest@38aa117: Resolving more false positives with Rcpp patch https://github.com/krlmlr/Rcpp/commit/4c4721aab4777fb60592511bbe571b98b1270bee
This is important to me, because dplyr on CRAN shows these rchk
errors: https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/dplyr.out.
I'll submit a PR for discussion pointing to this issue. Please advise.
Metadata
Metadata
Assignees
Labels
No labels