Open kbroman opened 4 years ago
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. See clang documentation.
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 llvm-7
with llvm-12
in the Dockerfile.)
Ugh; I can't figure out the appropriate way to use this __attribute__((no_sanitize("undefined")))
business. Since I'm only making one call to brent_fmin()
, I might just hard-code the function arguments.
Compiler on CRAN is giving this warning: