[Rd] Setting Gnu++11 when compiling R-devel on Windows

Avraham Adler avraham.adler at gmail.com
Mon Aug 8 17:56:07 CEST 2016

Recently, there have been changes to R-devel to make it more
compatible with GCC 6.x, which is great. Unfortunately, Windows still
uses a toolset based on GCC 4.9.3.

When compiling R release or R-patched, one can have GCC called with
-std=gnu++11 by having it in the CXXFLAGS in one's HOME/.R/Makevars as
well as by overwriting CXX1XSTD in

When trying the same procedure for R-devel (08-04 and 08-07) I see
that g++ is called without -std=gnu++11. I tried adding the call to
the CXX1YSTD flag as well (although that should be reserved for C++14)
and it did not help.

I can probably force it by adding it to the CXXFLAGS and CXX1XFLAGS in
Makeconf, but that seems to be somewhat overkill and may have
downstream effects of which I am unaware.

Am I correct in my assumption that the new CXXSTD macro as discussed
in the changelogs is automatically setting GCC 4.9.3 to C++98, and if
so, is there a similar way to R-3.3 to have GCC default to gnu++11
outside of forcing it in the general flags? If I am incorrect, I would
appreciate being pointed in the proper direction.

Thank you,


More information about the R-devel mailing list