KDAB / cxx-qt

Safe interop between Rust and Qt

Home Page:https://kdab.github.io/cxx-qt/book/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clang 17 return-type-c-linkage warning in qml-features

Be-ing opened this issue · comments

commented
warning: qml-features@0.1.0: /home/be/sw/cxx-qt/build/cargo/build/x86_64-unknown-linux-gnu/debug/build/qml-features-732e3917cae6739e/out/cxx-qt-gen/src/rust_signals.cxx.cpp:531:51: warning: 'cxx_qt_rust_signals$cxxbridge1$route_arguments_rust_signals_1' has C-linkage specified, but returns user-defined type '::cxx_qt_rust_signals::CxxQtConstructorArguments1' which is incompatible with C [-Wreturn-type-c-linkage]
warning: qml-features@0.1.0:   531 | ::cxx_qt_rust_signals::CxxQtConstructorArguments1 cxx_qt_rust_signals$cxxbridge1$route_arguments_rust_signals_1(::QUrl const &arg0) noexcept;
warning: qml-features@0.1.0:       |                                                   ^
warning: qml-features@0.1.0: 1 warning generated.
warning: qml-features@0.1.0: /home/be/sw/cxx-qt/build/cargo/build/x86_64-unknown-linux-gnu/debug/build/qml-features-732e3917cae6739e/out/cxx-qt-gen/src/rust_properties.cxx.cpp:551:54: warning: 'cxx_qt_rust_properties$cxxbridge1$route_arguments_rust_properties_1' has C-linkage specified, but returns user-defined type '::cxx_qt_rust_properties::CxxQtConstructorArguments1' which is incompatible with C [-Wreturn-type-c-linkage]
warning: qml-features@0.1.0:   551 | ::cxx_qt_rust_properties::CxxQtConstructorArguments1 cxx_qt_rust_properties$cxxbridge1$route_arguments_rust_properties_1(bool arg0, ::QUrl const &arg1, ::QUrl const &arg2, ::QString const &arg3) noexcept;
warning: qml-features@0.1.0:       |                                                      ^
warning: qml-features@0.1.0: 1 warning generated.

@LeonMatthesKDAB any ideas what might be wrong here, looks like your constructor code is declaring a CXX method returning a shared struct ?

That's just a shared CXX type, so might be a CXX issue. 🤔
Can you try reproducing with just a CXX Bridge and a shared type?