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

Avoid loop initial declarations for compat with Centos-7 #1053

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

larskanis
Copy link
Member

... and the declarations before statements, while being at it.

Fixes #1052

Fixes ffi#1052

The error was kind of:

FunctionInfo.c: In function bfntype_markb:
FunctionInfo.c:100:9: error: bforb loop initial declarations are only allowed in C99 mode
         for (size_t index = 0; index < fnInfo->callbackCount; index++) {
Warningy were kind of:

Function.c: In function binvoke_callbackb:
Function.c:959:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  959 |                 AbstractMemory* memory;
      |                 ^~~~~~~~~~~~~~
@larskanis larskanis merged commit 683e18b into ffi:master Sep 26, 2023
39 checks passed
@larskanis larskanis deleted the fix-1052 branch September 26, 2023 18:55
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.

gcc error when building on CentOS 7
1 participant