Hi Romain, is revision 4331 already in RcppArmadillo 3.9.0?
Best Simon On Jun 5, 2013, at 4:30 PM, Romain Francois <rom...@r-enthusiasts.com> wrote: > Most of these are in fact happening in armadillo's code base. > > Le 05/06/13 16:23, Simon Zehnder a écrit : >> Hi Rcpp-Users and Rcpp-Devels, >> >> I just build an RcppArmadillo project on my computer using gcc-4.8.1 and the >> newest Version of RcppArmadillo. I got some warnings I cannot explain to >> myself. It builds the library and installs it. Nevertheless I would like to >> know more about my warnings: >> >> In file included from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo:397:0, >> from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:36, >> from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29, >> from FinmixModel.cc:14: >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo_bits/fn_as_scalar.hpp: >> In static member function ‘static typename T1::elem_type >> arma::as_scalar_redirect<N>::apply(const T1&)’: >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo_bits/fn_as_scalar.hpp:48:34: >> warning: typedef ‘eT’ locally defined but not used [-Wunused-local-typedefs] >> typedef typename T1::elem_type eT; >> ^ >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo_bits/fn_as_scalar.hpp: >> In function ‘typename T1::elem_type arma::as_scalar(const >> arma::Base<typename T1::elem_type, T1>&)’: >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo_bits/fn_as_scalar.hpp:320:34: >> warning: typedef ‘eT’ locally defined but not used [-Wunused-local-typedefs] >> typedef typename T1::elem_type eT; >> ^ >> In file included from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo:397:0, >> from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:36, >> from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29, >> from FinmixModel.cc:14: >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo_bits/fn_as_scalar.hpp: >> In function ‘typename T1::elem_type arma::as_scalar(const >> arma::BaseCube<typename T1::elem_type, T1>&)’: >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/armadillo_bits/fn_as_scalar.hpp:384:34: >> warning: typedef ‘eT’ locally defined but not used [-Wunused-local-typedefs] >> typedef typename T1::elem_type eT; >> ^ >> In file included from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp/Module.h:352:0, >> from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp.h:63, >> from >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include/RcppArmadillo.h:30, >> from FinmixModel.cc:14: >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp/module/class.h: >> In member function ‘Rcpp::class_<Class>::self& >> Rcpp::class_<Class>::derives(const char*)’: >> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp/module/class.h:495:56: >> warning: typedef ‘parent_prop_class’ locally defined but not used >> [-Wunused-local-typedefs] >> typedef typename parent_class_::prop_class parent_prop_class ; > > This one I just fixed in rev 4331. > >> The FinmixModel class looks like: >> >> HEADER: >> #include <RcppArmadillo.h> >> // [[Rcpp::depends(RcppArmadillo)]] >> >> #include <string> >> >> class FinmixModel { >> >> public: >> Rcpp::List parList; >> arma::rowvec weightV; >> arma::uvec tV; >> >> bool indicFix; >> unsigned int K; >> unsigned int r; >> >> /* ctor */ >> FinmixModel(const Rcpp::S4& classS4); >> /* dtor */ >> ~FinmixModel(); >> }; >> >> CC: >> #include <RcppArmadillo.h> >> #include "FinmixModel.h" >> >> FinmixModel::FinmixModel(const Rcpp::S4& classS4) { >> >> /** >> * As the parameters 'par' can have very differing implementations >> * they are kept in a general Rcpp::List object which is then >> * decomposed in main code. >> * >> */ >> parList = classS4.slot("par"); >> weightV = Rcpp::as<arma::mat>(classS4.slot("weight")); >> >> /** >> * 'T' can be 'NA' if the model has no repetitions (Binomial) >> * in this case this attribute is set to an 1 x 1 vector >> * >> */ >> tV = Rcpp::as<arma::uvec>(classS4.slot("T")); >> indicFix = Rcpp::as<bool>(classS4.slot("indicfix")); >> K = Rcpp::as<unsigned int>(classS4.slot("K")); >> r = Rcpp::as<unsigned int>(classS4.slot("r")); >> } >> >> FinmixModel::~FinmixModel(){} >> >>> From looking into the files RcppArmadilloForward.h, fn_as_scalar.hpp and >>> class.h it seems that there is something about typedefs, but I am not sure. >>> It seems to me just not right, that all these warnings occur in my build >>> output. >> >> >> Best >> >> Simon > > > -- > Romain Francois > Professional R Enthusiast > +33(0) 6 28 91 30 30 > > R Graph Gallery: http://gallery.r-enthusiasts.com > > blog: http://blog.r-enthusiasts.com > |- http://bit.ly/Zs97qg : highlight 0.4.1 > `- http://bit.ly/10X94UM : Mobile version of the graph gallery > _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel