]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbsupport: remove C enum flags fallback
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 30 May 2024 20:28:19 +0000 (16:28 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 12 Aug 2024 14:58:49 +0000 (10:58 -0400)
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

index 50780043477c72292e16692381d8477140eebd67..56e0c524f009b9c1958a37500c87b0efaea1ecca 100644 (file)
@@ -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<E>::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 */