]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/eval.c
Add casts for legitimate integer to enum conversions
[thirdparty/binutils-gdb.git] / gdb / eval.c
index 7ccc8836aba10a5373071acaee74ba30e627e883..2beea10dbb2324f3a266064a2f1f7a7b82b7a667 100644 (file)
@@ -406,7 +406,8 @@ value_f90_subarray (struct value *array,
   int pc = (*pos) + 1;
   LONGEST low_bound, high_bound;
   struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array)));
-  enum f90_range_type range_type = longest_to_int (exp->elts[pc].longconst);
+  enum f90_range_type range_type
+    = (enum f90_range_type) longest_to_int (exp->elts[pc].longconst);
  
   *pos += 3;