[Rd] Using long long types in C++

Romain Francois romain at r-enthusiasts.com
Fri Sep 20 08:44:24 CEST 2013


Le 20 sept. 2013 à 02:31, Patrick Welche <prlw1 at cam.ac.uk> a écrit :

> On Fri, Sep 20, 2013 at 12:51:52AM +0200, romain at r-enthusiasts.com wrote:
>> In Rcpp we'd like to do something useful for types such as long long
>> and unsigned long long.
> ...
>> But apparently this is still not enough and on some versions of gcc
>> (e.g. 4.7 something), -pedantic still generates the warnings unless
>> we also use -Wno-long-long
> 
> Can you also add -std=c++0x or is that considered as bad as adding
> -Wno-long-long?

IIRC, a package on CRAN is not allowed to change -std, there is or at least was barriers to forbid this. 

Plus, some of us use the default settings on OSX, this is still (simili) gcc 4.2.1 which has long long but does not implement c++11

> (and why not use autoconf's AC_TYPE_LONG_LONG_INT and
> AC_TYPE_UNSIGNED_LONG_LONG_INT for the tests?)

Because no matter how many precautions we take, if at the end of the day we end up having mentions of long long in the code, even behind sufficient test, it will still generate warnings which i'm told would prevent the cran distribution of the package. 

I'd really like to hear from cran maintainers on this. 

> Cheers,
> 
> Patrick

Because


More information about the R-devel mailing list