Skip to content

Commit ff58bcf

Browse files
authored
Avoid adding fastcall attribute on linux aarch64 (#1282)
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 f3f342d commit ff58bcf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/hx/Object.h

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

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

0 commit comments

Comments
 (0)