On Thu, Oct 30, 2025 at 3:01 PM Maciej W. Rozycki <[email protected]> wrote:
> On Thu, 30 Oct 2025, Jonathan Wakely via Gcc wrote:
>
> > > Isn't functional testing for a new flag/feature added at the same
> time? Why would
> > > you have to test for supporting a feature?
> >
> > I think what Richi meant is not about GCC's own configure script. I
> > think he meant that if we document which version added features, then
> > it encourages people to write configure scripts that test versions
> > ("do we have at least GCC 14?") instead of testing "does $CC support
> > the -Wfoo warning flag?"
>
> Well, every tool can be used in the wrong way, but knowing the version
> helps people choose the correct one. Perhaps mostly useful for recent
> versions and not so much for ancient ones, but even there it might help
> chasing issues. Please let's not try to set policies for other people's
> software and make it an excuse to hide information.
>
I was thinking of header file macros that check for >= specific GCC
versions to define portability macros. I don't know how to confirm that
they are checking for the right minimum GCC for a specific feature.
--joel
>
> Maciej
>