[FFmpeg-devel] [PATCH 2/2] Require compilers to support C17.
Anton Khirnov
anton at khirnov.net
Wed Feb 7 18:36:10 EET 2024
Quoting Devin Heitmueller (2024-02-07 17:15:30)
> On Wed, Feb 7, 2024 at 4:50 AM Anton Khirnov <anton at khirnov.net> wrote:
> > Not to mention anonymous unions were standardized in C11 and widely
> > available for many years (possibly decades) before that, so it's hardly
> > a 'latest whizbang feature'.
>
> Yeah, I said "anonymous unions" because that was actually the
> justification you offered for making C17 the minimum. I wasn't
> intending to offer a critique on using any specific language feature,
> but rather wanted to make sure everyone agreed on the implications of
> changing the minimum compiler version.
You misunderstand, the argument for C17 rather than C11 has nothing to
do with anonymous unions, as they are available in both.
My original proposal was C11, but it was pointed out at FOSDEM that C17
has no new features and is pretty much just "C11 with bugfixes" - some
of them important for us - and all reasonably recent compilers should
support both. So if we are doing this at all, might as well take the
extra step. Nobody had any objections to that, which is why this patch
goes with C17.
> > > but there's a reason that many projects choose to have
> > > relatively old minimum language versions.
> > >
> > > Now, again, if the developer community all agree that it makes sense
> > > to stop supporting an operating system that was shipping as recently
> > > as five years ago, then so be it. But this sort of deprecation
> > > shouldn't simply be the result of a single developer deciding he wants
> > > to use anonymous unions (or some other C17 feature) and thus we drop
> > > support for a bunch of operating system versions.
> >
> > In case you missed it, I didn't just randomly send this out of the blue,
> > it was discussed at the FOSDEM dev meeting (and before that on IRC and
> > the ML) and literally nobody in the room was against moving to C11.
>
> Right, so like many people I'm not on the IRC 24x7, and regrettably I
> couldn't make the FOSDEM meeting. Perhaps I simply overlooked it, but
> I couldn't find anything on the ML other than the patch you sent on
> February 3rd changing it to C11. Given the possible implications, I
> would have expected to see a discussion on the ML. If such a
> discussion did happen on the ML and I overlooked it, then I guess it's
> on me for not raising concerns earlier.
>
> In fact, the FOSDEM discussion and the earlier patch was about C11,
> which I actually don't have any objection to. I would argue the same
> discussion should be had to assess the impact and conclude whether
> it's worth it, but it doesn't effect any of my use cases and (in my
> opinion) there are likely to be far fewer users impacted by such a
> change.
>
> This feels like just the sort of thing the TC is meant to
> discuss/resolve. And the fact that your position as the developer
> submitting the patch is that it's "no big deal" is exactly why it's
> the sort of thing that needs agreement from a wider audience.
I agree that there needs to be a discussion, and this thread is
precisely the place where it's happening.
See also my other proposal to switch to C11 for now, and C17 for 7.1.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list