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

Use GNU89 for kernel C #782

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Use GNU89 for kernel C #782

merged 1 commit into from
Dec 12, 2023

Conversation

mflatt
Copy link
Contributor

@mflatt mflatt commented Dec 11, 2023

C99/GNU99 is obviously well established and a sensible choice of standard for a C code base. Still, in some environments where it remains useful to compile Chez Scheme, the default gcc mode is GNU89.

Since C isn't the main development language for Chez Scheme, since it's easy to stick to GNU89, and since that usefully reduces build friction, this commit makes the few changes needs to get back to GNU89. GitHub CI is configured to use -std=gnu89 for two builds to help maintain the choice.

GNU89 is a little more flexible than C89 (ANSI C), because it allows declarations in the middle of a block, but it does not allow variables defined in the parentheses after for. We also rely on GNU extensions for inlining declarations.

The CI configuration here relies on #781, so this PR is a candidate for merging after that one.

C99/GNU99 is obviously well established and a sensible choice of
standard for a C code base. Still, in some environments where it
remains useful to compile Chez Scheme, the default `gcc` mode is
GNU89.

Since C isn't the main development language for Chez Scheme, since
it's easy to stick to GNU89, and since that usefully reduces build
friction, this commit makes the few changes needs to get back to
GNU89. GitHub CI is configured to use `-std=gnu89` for two builds to
help maintain the choice.

GNU89 is a little more flexible than C89 (ANSI C), because it allows
declarations in the middle of a block, but it does not allow variables
defined in the parentheses after `for`. We also rely on GNU extensions
for inlining declarations.
@mflatt mflatt merged commit 33db037 into cisco:main Dec 12, 2023
13 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.

2 participants