gdb: allow duplicate enumerators in flag enums
[deliverable/binutils-gdb.git] / gdb / valprint.c
index 77b9a4993d79306b5fa5ba1367f4ee24445fc3b7..888c9cdb577820b124e58298ddc2978bdd5d0924 100644 (file)
@@ -631,9 +631,10 @@ generic_val_print_enum_1 (struct type *type, LONGEST val,
     {
       int first = 1;
 
-      /* We have a "flag" enum, so we try to decompose it into
-        pieces as appropriate.  A flag enum has disjoint
-        constants by definition.  */
+      /* We have a "flag" enum, so we try to decompose it into pieces as
+        appropriate.  The enum may have multiple enumerators representing
+        the same bit, in which case we choose to only print the first one
+        we find.  */
       fputs_filtered ("(", stream);
       for (i = 0; i < len; ++i)
        {
This page took 0.024412 seconds and 4 git commands to generate.