[Rcpp-commits] r3648 - in pkg/Rcpp: inst/include src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 29 05:39:05 CEST 2012


Author: edd
Date: 2012-06-29 05:39:05 +0200 (Fri, 29 Jun 2012)
New Revision: 3648

Modified:
   pkg/Rcpp/inst/include/RcppCommon.h
   pkg/Rcpp/src/exceptions.cpp
Log:
support for clang++ 3.0


Modified: pkg/Rcpp/inst/include/RcppCommon.h
===================================================================
--- pkg/Rcpp/inst/include/RcppCommon.h	2012-06-29 03:38:12 UTC (rev 3647)
+++ pkg/Rcpp/inst/include/RcppCommon.h	2012-06-29 03:39:05 UTC (rev 3648)
@@ -95,6 +95,16 @@
     #endif
 #endif
 
+#ifdef __clang__
+    #define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
+    #if CLANG_VERSION < 30000
+        #define IS_EARLIER_THAN_CLANG_300
+    #endif
+    #if CLANG_VERSION >= 30000
+        #define IS_CLANG_300_OR_LATER
+    #endif
+#endif
+
 #ifdef __INTEL_COMPILER
     // This is based on an email by Alexey Stukalov who tested 
     // Intel Compiler 12.0 and states that is does support Cxx0x 

Modified: pkg/Rcpp/src/exceptions.cpp
===================================================================
--- pkg/Rcpp/src/exceptions.cpp	2012-06-29 03:38:12 UTC (rev 3647)
+++ pkg/Rcpp/src/exceptions.cpp	2012-06-29 03:39:05 UTC (rev 3648)
@@ -66,11 +66,21 @@
    compilers */
 #ifdef RCPP_HAS_DEMANGLING
 #include <typeinfo>
-#ifdef IS_EARLIER_THAN_GCC_460
-#include <exception_defines.h>
+#ifdef __GNUC__
+  #ifdef IS_EARLIER_THAN_GCC_460
+    #include <exception_defines.h>
+  #endif
+  #ifdef IS_GCC_460_OR_LATER
+    #include <bits/exception_defines.h>
+  #endif
 #endif
-#ifdef IS_GCC_460_OR_LATER
-#include <bits/exception_defines.h>
+#ifdef __clang__
+  #ifdef IS_EARLIER_THAN_CLANG_300
+    #include <exception_defines.h>
+  #endif
+  #ifdef IS_CLANG_300_OR_LATER
+    #include <bits/exception_defines.h>
+  #endif
 #endif
 #include <cxxabi.h>
 



More information about the Rcpp-commits mailing list