godotengine / godotengine/godot-cpp
4.0.1 Compliation error "implicit conversion loses integer precision: 'GDExtensionInt'" with XCode and CMake on MacOS M1
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
This can be reproduced with the following project...
https://github.com/PierceLBrooks/gdextensions
Also, here is an error message log dump sample showing details of the problem that are repeated times due template interactions upon build failure.
```
CompileC /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/godot-cpp.build/Debug/godot-cpp.build/Objects-normal/arm64/utility_functions.o /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/gen/src/variant/utility_functions.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'godot-cpp' from project 'godot-cpp')
cd /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-macos13.1 -fmessage-length\=80 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DCMAKE_INTDIR\=\"Debug\" -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -I/Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/bin/Debug/include -isystem /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/include -isystem /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/gen/include -isystem /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/gdextension -I/Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/godot-cpp.build/Debug/godot-cpp.build/DerivedSources-normal/arm64 -I/Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/godot-cpp.build/Debug/godot-cpp.build/DerivedSources/arm64 -I/Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/godot-cpp.build/Debug/godot-cpp.build/DerivedSources -F/Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/bin/Debug -fPIC -Wall -Wctor-dtor-privacy -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wwrite-strings -Wimplicit-fallthrough -Wno-ordered-compare-function-pointers -std\=c++17 -Werror -MMD -MT dependencies -MF /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/godot-cpp.build/Debug/godot-cpp.build/Objects-normal/arm64/utility_functions.d --serialize-diagnostics /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/godot-cpp.build/Debug/godot-cpp.build/Objects-normal/arm64/utility_functions.dia -c /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/gen/src/variant/utility_functions.cpp -o /Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/godot-cpp.build/Debug/godot-cpp.build/Objects-normal/arm64/utility_functions.o
/Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/gen/src/variant/utility_functions.cpp:701:74: error:
implicit conversion loses integer precision: 'GDExtensionInt'
(aka 'long long') to 'int' [-Werror,-Wshorten-64-to-32]
...___function(&ret, reinterpret_cast(args), arg_count);
~~~~~~~~~~~ ^~~~~~~~~
/Users/pbrooks/Development/Personal/Games/Friends/Kory/gdextensions/Project/build/dependencies/godot-cpp/build/release/gen/src/variant/utility_functions.cpp:732:74: error:
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.