KDAB / cxx-qt

Safe interop between Rust and Qt
https://kdab.github.io/cxx-qt/book/
993 stars 66 forks source link

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

Open Be-ing opened 5 months ago

Be-ing commented 5 months ago
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.
ahayzen-kdab commented 5 months ago

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

LeonMatthesKDAB commented 5 months ago

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