Skip to content

Remove declarations when prototypes are available - #10

Open
ardovm wants to merge 1 commit into
jimjag:trunkfrom
ardovm:gcc15
Open

ardovm wants to merge 1 commit into
jimjag:trunkfrom
ardovm:gcc15

Conversation

@ardovm

@ardovm ardovm commented Jan 4, 2026

Copy link
Copy Markdown

GCC 15.1.1 fails with a "conflicting types for ‘function_name'" error, citing the "previous declaration" from the header file.

As the included headers contains the prototypes, these definitions may be discarded.

This was tested under Linux, specifically openSUSE Leap 16.0.

The change seems to have happened in GCC 15, that applies the C23 standard by default.

GCC 15 fails with a "conflicting types for ‘function_name'" error,
citing the "previous declaration" from the header file.

As the included headers contains the prototypes, these definitions
may be discarded.
@ardovm

ardovm commented Jan 4, 2026

Copy link
Copy Markdown
Author

A possible workaround could be forcing an older C standard when the GCC version is >= 15. If you think that would be a better solution, just let me know.

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