tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: C++20 and gcc12/10
nia <nia%NetBSD.org@localhost> writes:
> Putting a compiler into a mode where it claims compliance with
> a specific language version (i.e. accepting -std=XX as a command line
> argument) is always the baseline feature other features are later built
> upon.
sure
> It would be extremely messy to specify
> USE_CXX_FEATURES+= c++11 c++14stdmode specific_c++14_feature
> to get some software to build.
yes, but if you actually try to make this work instead of constructing a
contrarian example, you'd end up with:
USE_CXX_FEATURES+= c++14-lite c++14-foo c++14-bar
for a program that needs:
the ability to pass --std=c++14 (baseline as you say)
the parts of c++14 that *in practice* are considered so core, such
that essentially all compilers that accept --std=c++14. Or really
such that if a compiler doesn't implement them, it is reasonable to
ignore it.
the foo and bar features from c++14, but not the other features
and I do not find that confusing or semantically troubled.
Defining c++NN_lite is of course tricky in theory, but operationally I
think it's just
What is the oldest gcc that is generally viewed as reasonable to
compile programs that claim to want c++NN? Not that it will compile
all programs, but that will compile a high enough fraction that it's
worth thinking about.
What is the oldest clang?
What are the features that are supported by both the oldest gcc and
oldest clang?
My impression is that the first clang to support a standard does a
pretty good job, and the first gcc leaves out more, with gccN having ok
support, gccN+1 having good support and gccN+2 having almost complete
support, typically. (That's just an impression and the question needs
to be asked on a per-NN basis anwyay.)
Home |
Main Index |
Thread Index |
Old Index