Skip to content

Commit 378eda1

Browse files
committed
Avoid adding fastcall attribute on linux aarch64
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); | ^ ```
1 parent 0b59d98 commit 378eda1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/hx/Object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ HXCPP_EXTERN_CLASS_ATTRIBUTES null BadCast();
4343
// CPPIA_CALL = fastcall on x86(32), nothing otherwise
4444
#if (defined(_WIN32) && !defined(_M_X64) && !defined(__x86_64__) && !defined(_ARM_) ) || \
4545
defined(HXCPP_X86) || defined(__i386__) || defined(__i386) || \
46-
(!defined(_WIN32) && !defined(_ARM_) && !defined(__arm__) && !defined(__x86_64__) )
46+
(!defined(_WIN32) && !defined(_ARM_) && !defined(__arm__) && !defined(__aarch64__) && !defined(__x86_64__) )
4747

4848
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(EMSCRIPTEN)
4949
#define CPPIA_CALL __attribute__ ((fastcall))

0 commit comments

Comments
 (0)