Edward,
I cannot replicate that. As you can see below, I do have -Wall -pedantic
and what not on, but with my compiler (g++-4.8) everything is good.
Dirk
R> sourceCpp("/tmp/edward.cpp", verbose=TRUE, rebuild=TRUE)
Generated extern "C" functions
--------------------------------------------------------
#include <Rcpp.h>
RcppExport SEXP sourceCpp_72843_len(SEXP ySEXP) {
BEGIN_RCPP
SEXP __sexp_result;
{
Rcpp::RNGScope __rngScope;
Rcpp::traits::input_parameter< const Eigen::VectorXd& >::type y(ySEXP );
Rcpp::List __result = len(y);
PROTECT(__sexp_result = Rcpp::wrap(__result));
}
UNPROTECT(1);
return __sexp_result;
END_RCPP
}
Generated R functions
-------------------------------------------------------
`.sourceCpp_72843_DLLInfo` <-
dyn.load('/tmp/RtmppWxdwY/sourcecpp_9911c88ac60/sourceCpp_76679.so')
len <- Rcpp:::sourceCppFunction(function(y) {}, FALSE,
`.sourceCpp_72843_DLLInfo`, 'sourceCpp_72843_len')
rm(`.sourceCpp_72843_DLLInfo`)
Building shared library
--------------------------------------------------------
DIR: /tmp/RtmppWxdwY/sourcecpp_9911c88ac60
/usr/lib/R/bin/R CMD SHLIB -o 'sourceCpp_76679.so' --preclean 'edward.cpp'
ccache g++-4.8 -I/usr/share/R/include -DNDEBUG
-I"/usr/local/lib/R/site-library/Rcpp/include"
-I"/usr/local/lib/R/site-library/RcppEigen/include" -fpic -g -O2
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -g -O3 -Wall -pipe -Wno-unused -pedantic -std=c++11 -c
edward.cpp -o edward.o
g++-4.8 -shared -Wl,-Bsymbolic-functions -Wl,-z,relro -o sourceCpp_76679.so
edward.o -L/usr/lib/R/lib -lR
R>
--
Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel