]> git.lttng.org Git - userspace-rcu.git/commitdiff
compiler.h: Remove caa_unqual_scalar_typeof
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 9 Jan 2025 16:08:23 +0000 (11:08 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 9 Jan 2025 16:08:23 +0000 (11:08 -0500)
commit dd8987a4052e ("Revert "compiler.h: Introduce caa_unqual_scalar_typeof"")
removed caa_unqual_scalar_typeof because it uses _Generic, which
requires C11, but liburcu supports C99.

caa_unqual_scalar_typeof was re-introduced by commit d18544842bdf
("Add CMM memory model"), even though it is unused within liburcu.

Remove it again.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I7713504433d142aee1bb1a39492843cd73b37fc2

include/urcu/compiler.h

index e027c130100ea00b2078601317ba2bdca3a5c84a..2868186e9e1e71b205957129d13ae7e35103ff01 100644 (file)
                                + __GNUC_PATCHLEVEL__)
 #endif
 
-#ifdef __cplusplus
-#define caa_unqual_scalar_typeof(x)                                    \
-       std::remove_cv<std::remove_reference<decltype(x)>::type>::type
-#else
-#define caa_scalar_type_to_expr(type)                                  \
-       unsigned type: (unsigned type)0,                                \
-       signed type: (signed type)0
-
-/*
- * Use C11 _Generic to express unqualified type from expression. This removes
- * volatile qualifier from expression type.
- */
-#define caa_unqual_scalar_typeof(x)                                    \
-       __typeof__(                                                     \
-               _Generic((x),                                           \
-                       char: (char)0,                                  \
-                       caa_scalar_type_to_expr(char),                  \
-                       caa_scalar_type_to_expr(short),         \
-                       caa_scalar_type_to_expr(int),                   \
-                       caa_scalar_type_to_expr(long),                  \
-                       caa_scalar_type_to_expr(long long),             \
-                       default: (x)                                    \
-               )                                                       \
-       )
-#endif
-
 /*
  * Allow user to manually define CMM_SANITIZE_THREAD if their toolchain is not
  * supported by this check.
This page took 0.030712 seconds and 4 git commands to generate.