Skip to content

no_init() triggers rchk errors #892

@krlmlr

Description

@krlmlr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions