Peter/Jürgen

Success with adding the -std=gnu++11 flag to the compiler on High Sierra.

TL;DR

I was able to test this on a VM with macOS High Sierra, and I’m seeing the same 
thing as Peter did.

I ran the script that checks for the C++ standard being used, and it returns 
199711L - indicating that the Apple compiler defaults to a C++ standard earlier 
than C++ 11. I was able to confirm that the Xcode command line tools for that 
version of macOS does support the C++11 standard by including -std=gnu++11 to 
the compiler arguments and re-running the test.

To test my theory out on High Sierra, I ran:

./configure CXXFLAGS=“-g -O2 -std=gnu++11”
make

The build succeeded. Rather than make the configure specific for macOS 
platforms, I’d suggest using the configure command above. Quick, dirty, and 
achieves the desired goal.

As an aside, It also appears that there is a test in the configure process for 
seeing if C++ 11 features are available without additional flags. Without the 
-std=gnu++11, the test fails (I looked at config.log for the gory details). But 
configure returns:

checking for g++ option to enable C++11 features... none needed

so you’d never know that the test actually failed without scouring the logs.

I’m not that aware of all the changes made in the various C++ standards 
iterations, but I wonder if what was added for Quad_MX.hh is C++11 and later 
code. I also have a question about what C++ standard GNU APL is written for. 
Does it require or assume that the compiler supports  C++11 or later?

- paul

> On Dec 1, 2024, at 11:56 PM, Paul Rockwell <paulrockw...@mac.com> wrote:
> 
> Peter (and Jűrgen) 
> 
> I think I've got a High Sierra VM hanging around that I might be able to 
> install the XCode command line tools on so I can test to see if gnu++11 is a 
> supported standards option. If that's the case, I'll download the latest GNU 
> APL
> SVN and see if it compiles successfully.
> 
>  I'll do that tomorrow for you.
> 
> - paul
> 

Reply via email to