[Rcpp-devel] Formatting Fixed - Clang 3.0 and 3.3 errors on sugar/set.h

Dirk Eddelbuettel edd at debian.org
Mon Nov 19 20:10:22 CET 2012


On 19 November 2012 at 13:02, Dirk Eddelbuettel wrote:
| On 19 November 2012 at 18:40, Chris Jefferson wrote:
| | On 19/11/12 17:33, Thell Fowler wrote:
| | >
| | > /home/thell/R/library/Rcpp/include/Rcpp/sugar/sets.h:28:2: error:
| | > invalid preprocessing directive
| | > #elseif defined(HAS_TR1_UNORDERED_SET)
| | 
| | Without looking any deeper at this (sorry), clang doesn't not accept 
| | elseif, it requires elif.
| | 
| | gcc actually doesn't do what you expect with elseif. It just ignores it 
| | if the #if isn't added, and causes a compile-time error if you end up 
| | actually reaching that line. So in:
| | 
| | #if defined(X)
| | 
| | #elseif defined(Y)
| | 
| | #endif
| | 
| | If X is not defined, nothing is included even if Y is defined. If X is 
| | defined, a compile-time error always occurs.
| | 
| | in you want someone with gcc, clang and c++0x experience have a dig 
| | through these headers, I am happy to download them and have a look.
| 
| Very nice catch!  I shall test and fix this.

Turns out that was already fixed in SVN.  

So file this is a second known bug in 0.10.0 (with the other being Baptiste's
inability to get arma::mat wrapped automagically).

Thell, would you mind trying again after a quick 'sudo edit ...' on this file
sets.h ?

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list