On Tue, Aug 6, 2024 at 12:10 AM Christoph M. Becker <cmbecker69@gmx.de> wrote:
On 05.08.2024 at 17:42, Pierre Joye wrote:
> On Mon, Aug 5, 2024, 10:03 PM Derick Rethans <derick@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.
Sorry, I meant to actually check if that feature is supported with
AC_COMPILE_*. It is painful but has proven to be the only reliable
way.
As gcc or VCC can be slightly more trusted using their versions, the
other, especially on MacOs, can't be trusted, ever. Let alone on other
OSes I still wonder why we support them for latest php 8 versions
(solaris f.e.).
> 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?
We can't :).
To my understanding the challenges are the extensions maintainers. On
Windows it is a controlled environment. We had similar discussions
back then when we dropped VC6, which was a much bigger step. I would
prefer to go with what makes your work easier than trying to keep
older VC support for the latest release, in case we decide to support
a minimum VC version for valid reasons. atomic support seems to be
one, the header one, I am very doubtful about it as something worth
the troubles :). This is being only about windows, that's indeed not
valid for any linux/*bsd/*wrt/etc.
cheers,
--
Pierre
@pierrejoye | http://www.libgd.org