Replies: 3 comments 2 replies
-
We take the GNUMakefile from perl. The Commit message is below to save some clicks.
|
Beta Was this translation helpful? Give feedback.
-
I used git blame, which in the GH web interface can be accessed by clicking on the line number and then the ellipsis that appears to its left. I'm not aware of the reasoning to set the standard to C99 instead of something later. A google search for This might be something for p5p. |
Beta Was this translation helpful? Give feedback.
-
I've found that I can replace the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
On MS Windows, the GNUmakefile (as of late in the 5.39 dev cycle) began prepending
-std=c99
to $Config{ccflags}.This ensures that, with gcc-13 and gcc-14, the standard C level is wound back from C17 to C99.
And with gcc-15, the level is wound back from C23 to C99.
With Ubuntu (and, I suspect, many other nix-type systems) no such "winding back" takes place, and the C level remains at gcc's default level.
Does anyone know of a good reason that Windows builds of perl should be treated this way ?
I've just built current blead (at commit ea0856c) on Windows 11 using gcc-15.1.0, such that there is no "winding back" of the C level, which stays at C23.
And I can find no issue - apart from the known Perl/perl5#23192, for which a simple interim workaround exists while we wait for the perl source to be fixed.
Why should this
-std=c99
spec be regarded as desirable ?I'm thinking that we should be aiming to have perl's source compliant with C23, and protecting ourselves under the C99 cloak is not the way to meet that aim.
I note that the winding back was not deemed significant enough to backport to the perl-5.38.x and 5.36.x patchlevel releases, for which the level reamins at gcc's default - which is C17 on Strawberry Perl and on my own builds.
Note: The simplest way to avoid having the
-std=c99
switch preprended to $Config{ccflags} is to simply comment out the following 2 lines in win32/GNUmakefile prior to building perl:Beta Was this translation helpful? Give feedback.
All reactions