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

CI: Compile with -std=c99 instead of -std=gnu99 #161

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

hartwork
Copy link
Collaborator

@hartwork hartwork commented Jan 9, 2024

No description provided.

@hartwork hartwork added the enhancement New feature or request label Jan 9, 2024
@hartwork hartwork added this to the 1.6.2 milestone Jan 9, 2024
Copy link
Collaborator

@edgar-bonet edgar-bonet left a comment

Choose a reason for hiding this comment

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

It could make sense to put -std=c99 in the Makefile rather than in the CI environment only.

@hartwork
Copy link
Collaborator Author

hartwork commented Jan 9, 2024

It could make sense to put -std=c99 in the Makefile rather than in the CI environment only.

@edgar-bonet I'm unsure how these two approaches compare in effect. I can follow your suggestions if it is a suggestion. What difference in effect do you expect?

@edgar-bonet
Copy link
Collaborator

If the user has a compiler that supports C99 but defaults to C90, then adding -std=c99 would be required. Having the option in the Makefile means the build would work out of the box, without the user having to figure out what environment variables have to be passed to make.

Maybe this is a bit far-fetched. GCC 4 defaulted to “gnu90” and GCC 5 to “gnu11”. The last release of GCC 4 was on Aug 2016, while the first release of GCC 5 was on April 2015. Maybe nobody is using GCC 4 anymore? I honestly don't know. I also don't know whether non-GNU compilers (like those in commercial Unixes) support “-std=”.

@hartwork
Copy link
Collaborator Author

hartwork commented Jan 9, 2024

@edgar-bonet thanks for elaborating, I'm in the same "don't know for sure place". Should we merge as is and only move to the Makefile when the first issue comes in?

@edgar-bonet
Copy link
Collaborator

Should we merge as is and only move to the Makefile when the first issue comes in?

OK, makes sense to me.

@hartwork hartwork merged commit f879146 into tenox7:master Jan 9, 2024
8 checks passed
@hartwork hartwork deleted the std-c99 branch January 9, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants