]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bitwise operation between different enumeration types
authorAlan Modra <amodra@gmail.com>
Tue, 9 Dec 2025 07:16:29 +0000 (17:46 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 9 Dec 2025 09:47:41 +0000 (20:17 +1030)
mips.cc:9478:50: error: bitwise operation between different enumeration types ‘elfcpp::<unnamed enum>’ and ‘elfcpp::<unnamed enum>’ is deprecated [-Werror=deprecated-enum-enum-conversion]
 9478 |           merged_flags &= ~(elfcpp::EF_MIPS_ARCH | elfcpp::EF_MIPS_MACH);
      |                             ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

* mips.h: Define all the EF_MIPS values in one enum.

elfcpp/mips.h

index 409a6324165d04c7be6fdc3ba564b19fb49bc16e..0551bbe0db22abd749eac6475a6de213741b813b 100644 (file)
@@ -204,14 +204,11 @@ enum
   /// Code in file uses the IEEE 754-2008 NaN encoding convention.
   EF_MIPS_NAN2008 = 0x00000400,
   // MIPS dynamic
-  EF_MIPS_DYNAMIC = 0x40
-};
+  EF_MIPS_DYNAMIC = 0x40,
 
 // Machine variant if we know it.  This field was invented at Cygnus,
 // but it is hoped that other vendors will adopt it.  If some standard
 // is developed, this code should be changed to follow it.
-enum
-{
   EF_MIPS_MACH = 0x00FF0000,
 
 // Cygnus is choosing values between 80 and 9F;
@@ -261,11 +258,9 @@ enum
   E_MIPS_MACH_GS464   = EF_MIPS_MACH_GS464,
   E_MIPS_MACH_GS464E  = EF_MIPS_MACH_GS464E,
   E_MIPS_MACH_GS264E  = EF_MIPS_MACH_GS264E,
-};
 
 // MIPS architecture
-enum
-{
+
   // Four bit MIPS architecture field.
   EF_MIPS_ARCH = 0xf0000000,
   // -mips1 code.
@@ -304,7 +299,6 @@ enum
   E_MIPS_ARCH_64R2 = EF_MIPS_ARCH_64R2,
   E_MIPS_ARCH_32R6 = EF_MIPS_ARCH_32R6,
   E_MIPS_ARCH_64R6 = EF_MIPS_ARCH_64R6,
-  
 };
 
 // Values for the xxx_size bytes of an ABI flags structure.