Skip to content

Conversation

@tobil4sk
Copy link
Member

fastcall should only be added for 32 bit x86, as explained in the comment. On some linux aarch64 compilers, none of the existing defines are set, and __aarch64__ is set instead. Adding this avoids warnings like:

In file included from /home/runner/haxelib/hxcpp/git/include/hxcpp.h:336:
/home/runner/haxelib/hxcpp/git/include/hx/Object.h:60:65: warning: ‘fastcall’ attribute directive ignored [-Wattributes]
   60 | typedef void (CPPIA_CALL *StackExecute)(struct StackContext *ctx);
      |                                                                 ^
In file included from /home/runner/haxelib/hxcpp/git/include/hxcpp.h:336:
/home/runner/haxelib/hxcpp/git/include/hx/Object.h:60:65: warning: ‘fastcall’ attribute directive ignored [-Wattributes]
   60 | typedef void (CPPIA_CALL *StackExecute)(struct StackContext *ctx);
      |                                                                 ^

fastcall should only be added for 32 bit x86, as explained in the
comment. On some linux aarch64 compilers, none of the existing defines
are set, and __aarch64__ is set instead. Adding this avoids warnings
like:

```
In file included from /home/runner/haxelib/hxcpp/git/include/hxcpp.h:336:
/home/runner/haxelib/hxcpp/git/include/hx/Object.h:60:65: warning: ‘fastcall’ attribute directive ignored [-Wattributes]
   60 | typedef void (CPPIA_CALL *StackExecute)(struct StackContext *ctx);
      |                                                                 ^
In file included from /home/runner/haxelib/hxcpp/git/include/hxcpp.h:336:
/home/runner/haxelib/hxcpp/git/include/hx/Object.h:60:65: warning: ‘fastcall’ attribute directive ignored [-Wattributes]
   60 | typedef void (CPPIA_CALL *StackExecute)(struct StackContext *ctx);
      |                                                                 ^
```
@tobil4sk tobil4sk force-pushed the fix/linux-aarch64-fastcall-warning branch from 378eda1 to 4be2564 Compare December 27, 2025 11:04
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.

1 participant