Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 897837 Details for
Bug 932722
sys-cluster/ceph-18.2.1-r2 failed to rebuild with gcc-14: dout.h:184:73: error: call to non-‘constexpr’ function ‘virtual unsigned int DoutPrefixProvider::get_subsys() const’
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
common/dout: fix FTBFS on GCC 14
ceph-18.2.1-fix-ftbfs-on-gcc14.patch (text/plain), 1.87 KB, created by
Chris Pfuhl
on 2024-07-17 10:09:16 UTC
(
hide
)
Description:
common/dout: fix FTBFS on GCC 14
Filename:
MIME Type:
Creator:
Chris Pfuhl
Created:
2024-07-17 10:09:16 UTC
Size:
1.87 KB
patch
obsolete
>diff --git a/src/common/dout.h b/src/common/dout.h >index 4cd60efff..d85267972 100644 >--- a/src/common/dout.h >+++ b/src/common/dout.h >@@ -144,17 +144,27 @@ struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {}; > #else > #define dout_impl(cct, sub, v) \ > do { \ >- const bool should_gather = [&](const auto cctX) { \ >- if constexpr (ceph::dout::is_dynamic<decltype(sub)>::value || \ >- ceph::dout::is_dynamic<decltype(v)>::value) { \ >+ const bool should_gather = [&](const auto cctX, auto sub_, auto v_) { \ >+ /* The check is performed on `sub_` and `v_` to leverage the C++'s \ >+ * guarantee on _discarding_ one of blocks of `if constexpr`, which \ >+ * includes also the checks for ill-formed code (`should_gather<>` \ >+ * must not be feed with non-const expresions), BUT ONLY within \ >+ * a template (thus the generic lambda) and under the restriction \ >+ * it's dependant on a parameter of this template). \ >+ * GCC prior to v14 was not enforcing these restrictions. */ \ >+ if constexpr (ceph::dout::is_dynamic<decltype(sub_)>::value || \ >+ ceph::dout::is_dynamic<decltype(v_)>::value) { \ > return cctX->_conf->subsys.should_gather(sub, v); \ > } else { \ >+ constexpr auto sub_helper = static_cast<decltype(sub_)>(sub); \ >+ constexpr auto v_helper = static_cast<decltype(v_)>(v); \ > /* The parentheses are **essential** because commas in angle \ > * brackets are NOT ignored on macro expansion! A language's \ > * limitation, sorry. */ \ >- return (cctX->_conf->subsys.template should_gather<sub, v>()); \ >+ return (cctX->_conf->subsys.template should_gather<sub_helper, \ >+ v_helper>()); \ > } \ >- }(cct); \ >+ }(cct, sub, v); \ > \ > if (should_gather) { \ > ceph::logging::MutableEntry _dout_e(v, sub); \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 932722
:
894347
| 897837 |
897838