Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no_init() triggers rchk errors #892

Closed
krlmlr opened this issue Aug 18, 2018 · 1 comment
Closed

no_init() triggers rchk errors #892

krlmlr opened this issue Aug 18, 2018 · 1 comment

Comments

@krlmlr
Copy link
Contributor

krlmlr commented Aug 18, 2018

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.

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.

@eddelbuettel
Copy link
Member

Taken care of by #893. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants