Revert "compiler: C++: simplify rseq_unqual_scalar_typeof implementation"
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Apr 2023 14:08:23 +0000 (10:08 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Apr 2023 14:08:23 +0000 (10:08 -0400)
This reverts commit 38f60c8d69e147b5997f850e4f163c36b2e1c91a.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/rseq/compiler.h

index 38c8db4fca9d427dc34a4816cc62973d56c022e3..e2afe061b77b6477a93a4176b6e20668b5ac963d 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifdef __cplusplus
 #define rseq_unqual_scalar_typeof(x)                                   \
-       std::remove_cv<__typeof__(x)>::type>
+       __typeof__(reinterpret_cast<std::remove_cv<__typeof__(x)>::type>((__typeof__(x))0))
 #else
 /*
  * Use C11 _Generic to express unqualified type from expression. This removes
This page took 0.02663 seconds and 4 git commands to generate.