Fix build failures with standard C 2023.#18
Merged
mohawk2 merged 1 commit intoPDLPorters:masterfrom Feb 25, 2025
Merged
Conversation
As initially identified in [Debian bug #1097250], PGPLOT is affected
by build failures caused by mismatching prototypes with Gcc 15:
In file included from PGPLOT.xs:16:
pgfun.c: In function ‘pgfun1’:
pgfun.c:78:7: warning: old-style function definition [-Wold-style-definition]
78 | float pgfun1(x)
| ^~~~~~
pgfun.c:79:4: error: number of arguments doesn’t match prototype
79 | float *x; {
| ^~~~~
pgfun.c:29:7: error: prototype declaration
29 | float pgfun1();
| ^~~~~~
pgfun.c: In function ‘pgfun2’:
pgfun.c:120:7: warning: old-style function definition [-Wold-style-definition]
120 | float pgfun2(x)
| ^~~~~~
pgfun.c:121:4: error: number of arguments doesn’t match prototype
121 | float *x; {
| ^~~~~
pgfun.c:30:7: error: prototype declaration
30 | float pgfun2();
| ^~~~~~
pgfun.c: In function ‘pgfunplot’:
pgfun.c:161:6: warning: old-style function definition [-Wold-style-definition]
161 | void pgfunplot(visible,x,y,z)
| ^~~~~~~~~
pgfun.c:163:4: error: number of arguments doesn’t match prototype
163 | float *x,*y,*z; {
| ^~~~~
pgfun.c:31:8: error: prototype declaration
31 | void pgfunplot();
| ^~~~~~~~~
This patch adds missing function argument types in prototypes, and
casts a couple of indirect function calls, to ensure compatibility
with the standard C 2023, now selected by default by gcc 15 and later.
[Debian bug #1097250]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097250
Signed-off-by: Étienne Mollier <emollier@debian.org>
Contributor
Author
|
I had a peek at the failing integration tests on Ubuntu, but I believe the failure is unrelated: I'm under the impression that the severe coverage regression is caused by some of the failing Ubuntu tests, although honestly I'm not too sure what went wrong precisely. Anyways, in hope this helps, |
Member
|
Thank you! As soon as the CI finishes a second time (PDL's CI removed X11, so I had to add X11 for this module's CI), I'll merge. |
mohawk2
added a commit
that referenced
this pull request
Feb 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As initially identified in Debian bug #1097250, PGPLOT is affected by build failures caused by mismatching prototypes with Gcc 15:
This patch adds missing function argument types in prototypes, and casts a couple of indirect function calls, to ensure compatibility with the standard C 2023, now selected by default by gcc 15 and later.