On 05.08.2024 at 17:42, Pierre Joye wrote:

> On Mon, Aug 5, 2024, 10:03 PM Derick Rethans <der...@php.net> wrote:
>
>> Instead of having to deal with tickets, wouldn't be be easier if the
>> compiler they used works with the features that we are using? That could
>> instantly provide a link to the documentation saving all of us time.
>
> it is significantly easier at configure time. Gcc 4.9 is (almost) fully c11
> compliant (not 4.7).

But what about other compilers we support on non Windows platforms
currently, like clang, Apple's clang, Solaris Studio and maybe some more
we don't even know about.

> As of windows, it will be dependent on the vc version used by the php minor
> branch where it may be introduced.

It's supposed to be introduced as of PHP 8.4.0, which already uses VS
17, although MSVC supports C11 as of VS 16.5 (while it never claimed to
support C99).  So in practise, even those still building their own
Windows binaries with Visual Studio 2019 should not be affected.

> That being said, I am not sure if the reason mentioned for using c11 in the
> initial post is used in external extensions (included headers etc), but at
> least on linux (or similar), an ext can be compiled with any version.

I somewhat doubt that; we're using a couple of C99 features (like mixed
declarations and statements) in the core for a couple of years (IIRC, as
of PHP 8.0.0), and extensions may do this with their own code, or might
be forced to include public php-src headers which may use some C99
features.  This may not be an issue with any C compilers actually still
in use, but can be sure about that?

And some extensions even require C++ support.

Christoph

Reply via email to