From 66673ad2e4574db3a65e25b307ad41bbcb165dc2 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 30 May 2024 16:28:19 -0400 Subject: [PATCH] gdbsupport: remove C enum flags fallback This might have been useful during the C -> C++ conversion (not sure), but it doesn't appear useful today. I don't see when enum-flags.h would be used in a C context. Change-Id: I6c7ed655757248a62a1bf6615995f42e8aa2b4bd --- gdbsupport/enum-flags.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/gdbsupport/enum-flags.h b/gdbsupport/enum-flags.h index 50780043477..56e0c524f00 100644 --- a/gdbsupport/enum-flags.h +++ b/gdbsupport/enum-flags.h @@ -51,8 +51,6 @@ some_flags f = 1; // error */ -#ifdef __cplusplus - /* Use this to mark an enum as flags enum. It defines FLAGS_TYPE as enum_flags wrapper class for ENUM, and enables the global operator overloads for ENUM. */ @@ -484,13 +482,4 @@ enum_flags::to_string (const string_mapping (&mapping)[N]) const return res; } -#else /* __cplusplus */ - -/* In C, the flags type is just a typedef for the enum type. */ - -#define DEF_ENUM_FLAGS_TYPE(enum_type, flags_type) \ - typedef enum_type flags_type - -#endif /* __cplusplus */ - #endif /* COMMON_ENUM_FLAGS_H */ -- 2.47.3