Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: make public headers compile with c89/c99/c11 pedantic errors #1159

Merged
merged 18 commits into from
Oct 24, 2024

Conversation

64
Copy link
Member

@64 64 commented Oct 15, 2024

Fixes #1150. Useful as a backstop to detect unwanted C99/C11/GNUisms.

Note that we omit the check for long long, i.e -Wno-long-long as it requires us to change too many things. In practice, compiling with zero errors under C89 does not matter - neither musl nor glibc's headers compile with -std=c89 -Werror -Wsystem-headers.

@64 64 force-pushed the c89-headers branch 15 times, most recently from 2040f47 to f06c114 Compare October 18, 2024 01:48
@64 64 changed the title tests: check public headers compile with c89 pedantic errors ci: check public headers compile with c89 pedantic errors Oct 18, 2024
@64 64 force-pushed the c89-headers branch 3 times, most recently from 9046429 to 4f1a0c3 Compare October 20, 2024 18:25
@64 64 changed the title ci: check public headers compile with c89 pedantic errors treewide: make public headers compile with c89 pedantic errors Oct 20, 2024
@64 64 force-pushed the c89-headers branch 9 times, most recently from c6fcba3 to 1e1fd04 Compare October 20, 2024 23:34
@no92
Copy link
Member

no92 commented Oct 21, 2024

The ABI check is complaining about a removed internal union member, this is not an ABI break though.

abis/linux/signal.h Show resolved Hide resolved
options/linux/include/sys/sysinfo.h Outdated Show resolved Hide resolved
@64 64 force-pushed the c89-headers branch 2 times, most recently from 25996b4 to 17fd35f Compare October 24, 2024 19:46
@64 64 changed the title treewide: make public headers compile with c89 pedantic errors treewide: make public headers compile with c89/c99/c11 pedantic errors Oct 24, 2024
Copy link
Member

@Dennisbonke Dennisbonke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Dennisbonke Dennisbonke added this pull request to the merge queue Oct 24, 2024
Merged via the queue into managarm:master with commit 5f6579a Oct 24, 2024
39 of 40 checks passed
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.

CI should check headers are c89-compatible
5 participants