Skip to content

Adapt to changed semantics of "type f();" in C23#33

Open
jamesjer wants to merge 1 commit intoSWI-Prolog:masterfrom
jamesjer:master
Open

Adapt to changed semantics of "type f();" in C23#33
jamesjer wants to merge 1 commit intoSWI-Prolog:masterfrom
jamesjer:master

Conversation

@jamesjer
Copy link
Copy Markdown
Contributor

The Fedora project is currently rebuilding all packages with a GCC 15 prerelease. GCC 15 changes the default C standard from C17 to C23. In C23, the semantics of type f(); have changed. Instead of meaning "a function that returns type with an unspecified parameter list" it now means the same as type f(void);; i.e., it asserts that there are no parameters. This makes the definition of pl_function_t not match its use, leading to a compilation error when building the swipy package.

This PR makes C23 use the same definition as C++ for pl_function_t. I have confirmed that the swipy package builds successfully with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant