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

Runtime type mismatch: throw error if NDBEUG is unset? #857

Closed
jackwasey opened this issue May 31, 2018 · 5 comments
Closed

Runtime type mismatch: throw error if NDBEUG is unset? #857

jackwasey opened this issue May 31, 2018 · 5 comments

Comments

@jackwasey
Copy link
Contributor

While debugging, I get runtime errors like:

Not compatible with requested type: [type=character; target=integer]

Would it be possible for Rcpp to hard-stop, like C++ assert does, in the case that compilation uses -UNDEBUG? This would be useful for debugging with gdb or lldb, and give a line number in the source code where the problem was encountered.

@eddelbuettel
Copy link
Member

Not sure. assert() and alike are frowned upon by CRAN Policy.

@jackwasey
Copy link
Contributor Author

Yes, I think so, but they compile (and I believe default R installs, also) use -DNDEBUG, so what I imagined was just Rcpp-based package developers enabling it while debugging.

@eddelbuettel
Copy link
Member

You could try with one or two and see -- some things "they" check are text based, some look at the shared library resulting from it. I think you are correct in that this test is based on the shared library.

@jackwasey
Copy link
Contributor Author

Ah, I see. Will take a look.

@eddelbuettel
Copy link
Member

Fixed via #860

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