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

c.std=gnu99 cannot be used with MSVC #10

Closed
boris-kolpackov opened this issue May 23, 2024 · 0 comments · Fixed by #11
Closed

c.std=gnu99 cannot be used with MSVC #10

boris-kolpackov opened this issue May 23, 2024 · 0 comments · Fixed by #11

Comments

@boris-kolpackov
Copy link

In the upcoming build2 release (0.17.0) we have tightened the c.std value check for MSVC. For details, see: build2/build2#383

That change uncovered that this package uses c.std=gnu99 which, naturally, cannot be satisfied by MSVC. So it would be helpful to fix this with a revision before the 0.17.0 release (in a few weeks).

As to how to fix this, I think it would be good to first understand whether the gnu part is actually necessary by trying to CI the package with c.std=99. If it runs out it's not necessary, then that's the fix. Of course, it's possible that the source code detects whether the GNU extensions are available and does something suboptimal if not, so it makes sense to also check the source code and upstream documentation.

If it turns out that gnu99 is necessary, then the correct way to do it is:

using c.guess

c.std = ($c.class == 'gcc' ? gnu99 : 99)

using c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant