From 378eda17880c4cdac7d435bcc5dfbf1bdfd2ac61 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Mon, 22 Dec 2025 02:10:10 +0000 Subject: [PATCH] Avoid adding fastcall attribute on linux aarch64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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); | ^ ``` --- include/hx/Object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hx/Object.h b/include/hx/Object.h index 8cf2fa8aa..45790a593 100644 --- a/include/hx/Object.h +++ b/include/hx/Object.h @@ -43,7 +43,7 @@ HXCPP_EXTERN_CLASS_ATTRIBUTES null BadCast(); // CPPIA_CALL = fastcall on x86(32), nothing otherwise #if (defined(_WIN32) && !defined(_M_X64) && !defined(__x86_64__) && !defined(_ARM_) ) || \ defined(HXCPP_X86) || defined(__i386__) || defined(__i386) || \ - (!defined(_WIN32) && !defined(_ARM_) && !defined(__arm__) && !defined(__x86_64__) ) + (!defined(_WIN32) && !defined(_ARM_) && !defined(__arm__) && !defined(__aarch64__) && !defined(__x86_64__) ) #if defined(__GNUC__) && !defined(__APPLE__) && !defined(EMSCRIPTEN) #define CPPIA_CALL __attribute__ ((fastcall))