[MacPorts] #53634: clang++-mp-4.0 -stdlib=macports-libstdc++ should be in C++11 mode by default

MacPorts noreply at macports.org
Fri May 12 04:21:40 UTC 2017

#53634: clang++-mp-4.0 -stdlib=macports-libstdc++ should be in C++11 mode by
  Reporter:  mojca      |      Owner:  mojca
      Type:  defect     |     Status:  assigned
  Priority:  Low        |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:
      Port:  clang-4.0  |

Comment (by kencu):

 There is a bit of logic in tools/clang/lib/Driver/Tools.cpp where the
 build line parsing logic looks for a std language standard to be set, and
 if there is none, appears to offer one up for c, but apparently not for
 c++ unless you're on Windows, if I read this correctly.

     if (!types::isCXX(InputType))
       Args.AddAllArgsTranslated(CmdArgs, options::OPT_std_default_EQ,
     else if (IsWindowsMSVC)
       ImplyVCPPCXXVer = true;

 `ImplyVCPPCXXVer = true` leads to a block of code later down that sets a
 standard language on Windows. So far, this would seem to me to be the most
 likely place to add in a default c++ language standard, if a suitable test
 for darwin && stdlib=macports-libsdtc++ could be generated.

Ticket URL: <https://trac.macports.org/ticket/53634#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS

More information about the macports-tickets mailing list