tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: c++20: require gcc12?



Martin Husemann <martin%duskware.de@localhost> writes:

> On Tue, Feb 11, 2025 at 02:27:05PM -0500, Greg Troxel wrote:
>> Martin Husemann <martin%duskware.de@localhost> writes:
>> 
>> > Since this is the canonical way to have autoconf test for C++20 support,
>> > I guess we really need to enforce a newer gcc.
>> 
>> I think it's really obvious that if gcc says you need 12 that we need to
>> code 12.  I don't understand why there are any objections to doing
>> that....
>
> Because the predicate "c++20 support" is not very usefull.
> You could read it as "you can't use clang at all" for example.

If a program says "I need C++20" (which they do), and pkgsrc offers "I
need a compiler that supports C++20" then it seems obvious that we
should cause asking for that to get a compiler that the compiler
maintainers say meets the standard.  Yes, when there is no version that
fully meets it, it's tough.  But with gcc we are not in that situation.

> Gcc only has a single box in their C++20 support matrix marked as gcc 12,
> everything else has been available longer.

Yes, but if you are told "this program is in c++20" and you want a
compiler that will compile it, then you want to use 12 or higher.

> But practical speaking: since AC_CXX_COMPILE_STDXX([20]....) will fail>
> on gcc 10 as we found out, it is pretty clear that we need something > 10,
> even if that is not really required for most software out there -
> only for lazyness of configure.ac authors.

I don't think it's really lazyness, as much as there is a standard, we
asked for it, did we get it?  The practice of using pre-releases that
don't really support a standard and pretending it sort of does is in my
view not sound or healthy.

If somebody wants to figure out how to split the standard into N pieces
and then try to code to that, fine, but I don't think that should have
us deviate from "i asked for x, give me x".   A package could be coded
"needs full c++17 and the following 12 of the 15 c++20 features".  I
don't think that's a reasonable thing to do.



Home | Main Index | Thread Index | Old Index