================
@@ -541,7 +588,33 @@ struct scan_results
 };
 
 }  // unnamed namespace
+} // extern "C"
+
+namespace {
+// The logical model for casting authenticated function pointers makes
+// it impossible to directly cast them without breaking the authentication,
+// as a result we need this pair of helpers.
+template <typename PtrType>
+[[maybe_unused]] void set_landing_pad_as_ptr(scan_results& results, const 
PtrType& out) {
----------------
kovdan01 wrote:

I see that you've added `[[maybe_unused]]` as a workaround for some kind of 
compiler bug in 8d620b026e96afb06e5693b1b643e64a3d29ebdb. I also see that 
you've briefly described the bug in 
https://github.com/llvm/llvm-project/pull/143230#issuecomment-3161594536.

Do I get it right that you were not observing that locally and that was only 
appearing on buildbots? I tried to remove this `[[maybe_unused]]` attr, and 
nothing changes - everything compiles perfectly w/o any related warnings.

I think it's worth submitting an issue about such mis-diagnostics if it's 
present (or finding an existing issue for that) and providing the link to the 
issue in comment so those reading the code would have an explanation for this 
attribute (otherwise, it's not clear why it's needed).

The same applies to `get_landing_pad_as_ptr` and `set_cie_info_personality`.

https://github.com/llvm/llvm-project/pull/143230
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to