Re: Require C11 in PHP 8.4

From: Date: Mon, 12 Aug 2024 15:56:15 +0000
Subject: Re: Require C11 in PHP 8.4
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Sat, Aug 10, 2024 at 6:22 AM Christoph M. Becker <[email protected]> wrote:
>
> On 01.08.2024 at 23:57, Ilija Tovilo wrote:
>
> > Hence, it seems like it would be ok to bump our C compiler requirement
> > to C11. We'd like to make this change before beta 1 if there are no
> > objections. There are no immediate plans to make non-optional use of
> > other C11 features, although that is conceivable at some point.
>
> So skimming the whole discussion[1] it seems that most are generally
> fine with bumping the requirements to C11, except for Giovanni Giacobbi
> (whose draft PR[2] had no further discussion so far), and maybe for some
> uncertainties regarding some less used compilers.
>
> Given that feature freeze is in 3 days[3], it appears to be prudent to
> have a final decision now, and to close PR #15079[4] if we're going with
> C11, or merge that or Giovanni's PR[2], otherwise.
>
> And if we're going with C11, figuring out the details (which
> configuration check to use, or only documenting the requirement) can
> still be decided somehwat later, in my opinion.
>
> [1] <https://externals.io/message/124706>
> [2] <https://github.com/php/php-src/pull/15202>
> [3] <https://wiki.php.net/todo/php84#timetable>
> [4] <https://github.com/php/php-src/pull/15079>
>
> Cheers,
> Christoph

Given the timetable, I wouldn't change the C std requirements for 8.4.
I would stop relying on the typedef and forward declare only the
struct, and that. Note that although Windows supports C11, it does not
support all features including atomics. Someone chimed in to say that
they are available, but this doesn't match the information I got from
a coworker who did a similar test. Given conflicting information and
the short timetable, I think we should lean towards being cautious. I
hope for 8.5/9.0 we can move to C11/C17 which can improve the typedef
situation, simplify our atomics handling, and more.


Thread (33 messages)

« previous php.internals (#124890) next »