From bfee76a88bcadc6fd7007580aa49f27a8cacf622 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 9 Jan 2025 11:08:23 -0500 Subject: [PATCH] compiler.h: Remove caa_unqual_scalar_typeof 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 Change-Id: I7713504433d142aee1bb1a39492843cd73b37fc2 --- include/urcu/compiler.h | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/include/urcu/compiler.h b/include/urcu/compiler.h index e027c130..2868186e 100644 --- a/include/urcu/compiler.h +++ b/include/urcu/compiler.h @@ -151,32 +151,6 @@ + __GNUC_PATCHLEVEL__) #endif -#ifdef __cplusplus -#define caa_unqual_scalar_typeof(x) \ - std::remove_cv::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.