-
Notifications
You must be signed in to change notification settings - Fork 23
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
Compiler warning about function call in brent's method #169
Comments
This seems identical to what's in optimize.c in the R stats package. |
I'm going to close this and not fix it; CRAN seems to be allowing the warning. |
I think I can add a function attribute to avoid this warning, and so I’ll re-open the issue. |
Seems like the following docker container is just want I need for testing: rocker/r-devel-ubsan-clang (Seems like you need to re-build it, and that you need to replace |
Ugh; I can't figure out the appropriate way to use this |
- brent_fmin takes a general function with a void * for args, but apparently this is "undefined behavior" and CRAN says I need to fix the warning. - There seems to be a way to suppress the warning, but I can't figure out how to do it. <https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#disabling-instrumentation-with-attribute-no-sanitize-undefined> - So here I'm using the ugly approach, of just hard-coding particular function arguments, since I just use brent_fmin() a single time.
- brent_fmin takes a general function with a void * for args, but apparently this is "undefined behavior" and CRAN says I need to fix the warning. - There seems to be a way to suppress the warning, but I can't figure out how to do it. <https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#disabling-instrumentation-with-attribute-no-sanitize-undefined> - So here I'm using the ugly approach, of just hard-coding particular function arguments, since I just use brent_fmin() a single time.
Compiler on CRAN is giving this warning:
The text was updated successfully, but these errors were encountered: