compiler: C++: simplify rseq_unqual_scalar_typeof implementation
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Apr 2023 12:54:19 +0000 (08:54 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Apr 2023 12:54:19 +0000 (08:54 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I55b57c217e4338ebeb4947c3452de1422fe5f10c

include/rseq/compiler.h

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