[PATCH 1/2] Enable C++

Petr Machata pmachata at redhat.com
Tue Apr 7 17:10:40 UTC 2015


Mark Wielaard <mjw at redhat.com> writes:

> I was mostly wondering whether we needed to add an command line argument
> like -std=gnu++98 to be sure. But maybe that is all implicit and
> standard for all gcc versions anyway.

Actually I can't find code that c++98 mode would reject and gnu++98
would allow.  -pedantic makes all the difference, and it makes it
regardless of the dialect chosen.

Which makes it kinda hard to actually test for gnu++98 support.  Which I
think we formally need, for all the GNU C stuff that we get in C headers
((struct X) {blah, blah}, long long literals, __VA_ARGS__).  But GCC
happily compiles that in c++98 mode anyway.

So, I don't know.  Maybe I just compile the test case with -std=gnu++98
and make it "Checking for working C++ compiler that accepts -std=gnu++98"?

Clang knows about the option as well, FWIW.

Thanks,
Petr


More information about the elfutils-devel mailing list