Skip to content

Check whether compiler supports 'for loop initial declaration' #6314

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

Closed
wants to merge 1 commit into from

Conversation

Danack
Copy link
Contributor

@Danack Danack commented Oct 10, 2020

I haven't been able to test this correctly errors on a non-C99 system.

If anyone has a system that has a supported version of autoconf and a compiler that doesn't support the for loop initialisation part of C99, please could you double-check it errors correctly?

This is to make it clearer to end-users that they need a C99 compatible compiler, to avoid confusing errors like: https://bugs.php.net/bug.php?id=80211

@nikic
Copy link
Member

nikic commented Oct 10, 2020

AC_PROG_CC_C99 should also be checking this. Probably we should error out if fails though.

After calling this macro you can check whether the C compiler has been set to accept C99; if not, the shell variable ac_cv_prog_cc_c99 is set to ‘no’.

@Danack
Copy link
Contributor Author

Danack commented Oct 10, 2020

Okay, will close this in favour of another.

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