Skip to content

Avoid adding fastcall attribute on linux aarch64 - #1282

Merged
Simn merged 1 commit into
HaxeFoundation:masterfrom
tobil4sk:fix/linux-aarch64-fastcall-warning
Mar 15, 2026
Merged

Avoid adding fastcall attribute on linux aarch64#1282
Simn merged 1 commit into
HaxeFoundation:masterfrom
tobil4sk:fix/linux-aarch64-fastcall-warning

Conversation

@tobil4sk

Copy link
Copy Markdown
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);
      |                                                                 ^

@tobil4sk
tobil4sk force-pushed the fix/linux-aarch64-fastcall-warning branch from 378eda1 to 4be2564 Compare December 27, 2025 11:04
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 4be2564 to 047c0e5 Compare January 13, 2026 22:02
@Simn
Simn merged commit ff58bcf into HaxeFoundation:master Mar 15, 2026
120 checks passed
@tobil4sk
tobil4sk deleted the fix/linux-aarch64-fastcall-warning branch March 15, 2026 16:26
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