[Rcpp-commits] r2372 - in pkg/Rcpp: . inst inst/include inst/include/Rcpp

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Oct 31 02:21:12 CET 2010


Author: edd
Date: 2010-10-31 02:21:12 +0100 (Sun, 31 Oct 2010)
New Revision: 2372

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/DESCRIPTION
   pkg/Rcpp/TODO
   pkg/Rcpp/inst/NEWS
   pkg/Rcpp/inst/include/Rcpp/Extractor.h
   pkg/Rcpp/inst/include/RcppCommon.h
Log:
new define for gcc/g++ 4.5.0 or later
disable fast indexing on g++ 4.5.0 or later
mark the 'well why did we need that?' as an open question
increased version by 0.0.0.1 to 0.8.7.2


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2010-10-29 19:57:41 UTC (rev 2371)
+++ pkg/Rcpp/ChangeLog	2010-10-31 01:21:12 UTC (rev 2372)
@@ -1,3 +1,9 @@
+2010-10-30  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/include/RcppCommon.h: New define IS_GCC_450_OR_LATER
+	* inst/include/Rcpp/Extractor.h: Do not enable Rcpp::Fast if g++
+	4.5.0 or later is used -- we need to figure out what upsets it
+
 2010-10-23  Romain Francois <romain at r-enthusiasts.com>
 
 	* inst/include/Rcpp/vector/MatrixRow.h: Faster row indexing

Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION	2010-10-29 19:57:41 UTC (rev 2371)
+++ pkg/Rcpp/DESCRIPTION	2010-10-31 01:21:12 UTC (rev 2372)
@@ -1,6 +1,6 @@
 Package: Rcpp
 Title: Seamless R and C++ Integration
-Version: 0.8.7.1
+Version: 0.8.7.2
 Date: $Date$
 Author: Dirk Eddelbuettel and Romain Francois, with contributions 
  by Douglas Bates, John Chambers, Simon Urbanek, and David Reiss; 

Modified: pkg/Rcpp/TODO
===================================================================
--- pkg/Rcpp/TODO	2010-10-29 19:57:41 UTC (rev 2371)
+++ pkg/Rcpp/TODO	2010-10-31 01:21:12 UTC (rev 2372)
@@ -20,6 +20,8 @@
     o   const operators, as requested on Rcpp-devel:
         http://permalink.gmane.org/gmane.comp.lang.r.rcpp/494
 
+    o   Fast indexing and g++ 4.5.0 or later: open issue of why this compiler
+        gets upset when the previous version(s) coped just fine
 
 Modules 
 

Modified: pkg/Rcpp/inst/NEWS
===================================================================
--- pkg/Rcpp/inst/NEWS	2010-10-29 19:57:41 UTC (rev 2371)
+++ pkg/Rcpp/inst/NEWS	2010-10-31 01:21:12 UTC (rev 2372)
@@ -17,6 +17,8 @@
 
         - POSIXct, POSIXt now correctly ordered for R 2.12.0 
 
+    o   Disable fast indexing if g++ 4.5.0 or later is used 
+
 0.8.7   2010-10-15
 
     o   As of this version, Rcpp depends on R 2.12 or greater as it interfaces 

Modified: pkg/Rcpp/inst/include/Rcpp/Extractor.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Extractor.h	2010-10-29 19:57:41 UTC (rev 2371)
+++ pkg/Rcpp/inst/include/Rcpp/Extractor.h	2010-10-31 01:21:12 UTC (rev 2372)
@@ -32,7 +32,10 @@
 
     // apparently Rcpp::Fast upsets windows, so we stick with 
     // the identity class above, meaning no fast indexing
-#ifndef WIN32
+    // update 30 Oct 2010: that may have been g++ 4.5 rather than Windows
+    //                     so rephrasing text in terms of macro from RcppCommon.h
+//#ifndef WIN32
+#ifndef IS_GCC_450_OR_LATER
     template <> 
     struct Extractor<INTSXP, true, Rcpp::Vector<INTSXP> >{
         typedef Rcpp::Fast< Rcpp::Vector<INTSXP> > type ;

Modified: pkg/Rcpp/inst/include/RcppCommon.h
===================================================================
--- pkg/Rcpp/inst/include/RcppCommon.h	2010-10-29 19:57:41 UTC (rev 2371)
+++ pkg/Rcpp/inst/include/RcppCommon.h	2010-10-31 01:21:12 UTC (rev 2372)
@@ -64,6 +64,10 @@
 		#define HAS_TR1_UNORDERED_MAP
 		#define HAS_TR1_UNORDERED_SET
 	#endif
+    // g++ 4.5 does not seem to like some of the fast indexing
+    #if GCC_VERSION >= 40500
+        #define IS_GCC_450_OR_LATER
+    #endif
 #endif
 
 #include <iterator>



More information about the Rcpp-commits mailing list