From romain at r-enthusiasts.com  Fri Sep 20 08:44:24 2013
From: romain at r-enthusiasts.com (Romain Francois)
Date: Fri, 20 Sep 2013 08:44:24 +0200
Subject: [Rd] Using long long types in C++
In-Reply-To: <20130920003145.GE482@quark>
References: <9df9f69d52dfdddccbf8e32f18dd227a@r-enthusiasts.com>
	<20130920003145.GE482@quark>
Message-ID: <08131FE2-55C0-4EAE-A038-49E3E2314B86@r-enthusiasts.com>

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


[Rd] Using long long types in C++
Romain Francois