This has the look of an over-zealous optimizer that doesn't understand
how 32-bit integer arithmetic works. It is possible to define a flag
to force using doubles to check for integer addition overflow if that
is needed for the compiler used here.
luke
On Wed, 23 Apr 2014, Erich Neuwirth wrote:
On Apr 23, 2014, at 3:04 AM, Josh EmBree wrote:
> Hi all,
>
> I know this issue has come up a lot in the last few months and I’ve searched
> around for days trying to find a solution. I can’t get my C++ files that use
> Rcpp to compile in OS X 10.9 (Mavericks). I’ve done the following:
>
> -
Josh:
I see the same issue. But it appears not to be a problem with the
point_mcmc.cpp version of the code. If I issue sourceCpp('point_mcmc.cpp') from
within R, it works fine. sourceCpp('point_mcmc.cpp', verbose=TRUE) gives
further hints (i.e., effect of R CMD SHLIB is different from within R;
Some more strange things:
> 20L+2L
[1] -2094967296
> 20L*2L
[1] NA
> 2147483647L+2147483647L
[1] -2
(2147483647 = 2^31-1)
So this looks like an integer overflow is not caught for addition, but it is
for multiplication
This is my R version:
> sessionInfo()
R version 3
Dunno if it helps anyone, but a check of local builds lying around shows the
issue in
R version 3.0.2 Patched (2013-11-19 r64260) -- "Frisbee Sailing"
but NOT in
R Under development (unstable) (2013-11-11 r64196) -- "Unsuffered Consequences"
So, it seems that either we introduced a change duri
Hi all,
I know this issue has come up a lot in the last few months and I’ve searched
around for days trying to find a solution. I can’t get my C++ files that use
Rcpp to compile in OS X 10.9 (Mavericks). I’ve done the following:
-Downloaded Xcode 5 and installed command line tools,
-Upgraded