[Rcpp-devel] long long

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Fri Sep 20 15:46:17 CEST 2013


I don't know why this thread only popped up now in my gmail; I have been
following it on R-devel.

I have just skimmed the extensive discussion, but I just want to add a few
things
  - presently, the default compiler on OS X Mountain Lion is not clang,
which is what Romain was testing with, but a stock GCC.  Difference is this:

sleipner-1 $ /usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
sleipner-1 $ /usr/bin/gcc-4.2 --version
i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  - Aside from GCC and clang, I would say the Intel compilers are worth
thinking about for serious use.

I don't know how hard this is to do, but I guess the "right" way to deal
with this is to use autoconf to detect all of this and then use something
like
  R_CPP_HAS_C11++
with some stub for throwing an error if a feature is used on a platform not
supporting R_CPP.  That should work for simple examples, but it may be hard
to do the autoconf test.  And of course, Rcpp is anything but "a simple
example" so I don't even know if this is possible in theory.

Anyway, I know this is mostly noise, but wanted to remind you of the OS X
issue.

Best,
Kasper



On Fri, Sep 20, 2013 at 8:47 AM, Smith, Dale (Norcross) <
Dale.Smith at fiserv.com> wrote:

> I agree with Romain's approach, which I was going to send later today:
>
> " After reading this thread and others, I would tentatively suggest
> maintaining a C++11 compliant version on r-forge for those who need it. I
> do recognize this is additional work, but may be worth the effort. A case
> can be made here that CRAN, which is not allowed to change compilers, may
> develop a conflict with Rcpp and its growing user community."
>
> Dale Smith, Ph.D.
> Senior Financial Quantitative Analyst
> Financial & Risk Management Solutions
> Fiserv
> Office: 678-375-5315
> www.fiserv.com
>
>
> -----Original Message-----
> From: rcpp-devel-bounces at r-forge.wu-wien.ac.at [mailto:
> rcpp-devel-bounces at r-forge.wu-wien.ac.at] On Behalf Of
> romain at r-enthusiasts.com
> Sent: Friday, September 20, 2013 8:41 AM
> To: Dirk Eddelbuettel
> Cc: rcpp-devel at r-forge.wu-wien.ac.at
> Subject: Re: [Rcpp-devel] long long
>
> Le 2013-09-20 14:24, Dirk Eddelbuettel a écrit :
> > Just to bring closure to this thread: Per Section 1.7 of the "Writing
> > R Extensions" manual, the 'C++98' standard, without any C99
> > extensions, is prescribed by CRAN.
>
> That is not the way I read it. It says to use the tools given by the
> compiler to find potential problems.
> Fine. Done that. Identified the portability problem, dealing with it with
> conditional compilation. Prooving it. Not good enough ?
>
> As people might have seen on other channels (twitter). I'm forking Rcpp
> into Rcpp11. This will be a version that enforces C++11.
>
> I'm not expecting to be able to distribute Rcpp11 on CRAN, but Dirk
> probably will keep maintaining Rcpp.
> I'll have to figure out where and how to distribute Rcpp11. It should not
> be too hard to come up with a repository that complies with
> install.packages.
>
> CRAN is an amazing resource and a huge part of the success of R. Rcpp11
> will need a different repo, so be it. Maybe in the long run, I'll be able
> to show that it was worth experimenting on C++11, maybe not. I'm just
> moving away from this problem.
>
> Romain
>
> PS: I'm still interested in some constructive discussion about the
> original question.
>
> > That explicitly excludes long long. So we are back to where we were
> > years
> > ago: you only get 'long long' in Rcpp if you enable the '-std=c++11'
> > (or
> > -std=c++0x') extensions not allowed at CRAN.
> >
> > Sadly, two of the R manuals also (falsely) claim that no C++11
> > compliant compilers exist. That changed in the summer of 2013, and I
> > plan to file a bug report against the manuals once R 3.0.2 is out next
> > week.
> >
> > Dirk
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130920/bec57a62/attachment-0001.html>


More information about the Rcpp-devel mailing list