From: Simon Marchi Date: Thu, 30 May 2024 20:28:19 +0000 (-0400) Subject: gdbsupport: remove C enum flags fallback X-Git-Tag: gdb-16-branchpoint~1176 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66673ad2e4574db3a65e25b307ad41bbcb165dc2;p=thirdparty%2Fbinutils-gdb.git 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 --- 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 */