Skip to content
Prev 6438 / 10988 Next

[Rcpp-devel] long long

Alright, so with these settings -pedantic turns on -Wlong-long

I can disable them with -Wno-long-long

Can we detect gcc with a configure and set -Wno-long-long, is that allowed ?

Where in the CRAN policies does it say that -pedantic should be used ? I 
did not find it.



We don't actually "compile" code that needs rcpp_long_long_type in Rcpp 
(in the .cpp files), so I might have an idea to move this problem.

We could put this behind another define, like this:

#if defined(RCPP_LONG_LONG_SUPPORT)
#if defined(__GNUC__) &&  defined(__LONG_LONG_MAX__)
     __extension__ typedef long long int rcpp_long_long_type;
     __extension__ typedef unsigned long long int rcpp_ulong_long_type;
     #define RCPP_HAS_LONG_LONG_TYPES
#endif
#endif

so that Rcpp compiles fine, and if someone wants to use it, then in 
their code thay can :

#define RCPP_LONG_LONG_SUPPORT
#include <Rcpp.h>

On your machine with your settings, this no longer warns.

Romain


Le 19/09/13 18:32, Dirk Eddelbuettel a ?crit :