gdb/mi: remove warning about mi1
[binutils-gdb.git] / gdb / f-lang.c
index 7ab2a7b0688f902a19ce520f4c64e95c3570643a..fc0614e576170967f1396455ec4d6d3750a04aa4 100644 (file)
@@ -271,8 +271,8 @@ public:
   {
     if (inner_p)
       {
-       gdb_assert (m_mark == nullptr);
-       m_mark = value_mark ();
+       gdb_assert (!m_mark.has_value ());
+       m_mark.emplace ();
       }
   }
 
@@ -282,9 +282,8 @@ public:
   {
     if (inner_p)
       {
-       gdb_assert (m_mark != nullptr);
-       value_free_to_mark (m_mark);
-       m_mark = nullptr;
+       gdb_assert (m_mark.has_value ());
+       m_mark.reset ();
       }
   }
 
@@ -305,9 +304,9 @@ protected:
      written.  */
   LONGEST m_dest_offset;
 
-  /* Set with a call to VALUE_MARK, and then reset after calling
-     VALUE_FREE_TO_MARK.  */
-  struct value *m_mark = nullptr;
+  /* Set and reset to handle removing intermediate values from the
+     value chain.  */
+  gdb::optional<scoped_value_mark> m_mark;
 };
 
 /* A class used by FORTRAN_VALUE_SUBARRAY when repacking Fortran array
@@ -1933,7 +1932,7 @@ fortran_prepare_argument (struct expression *exp,
 
   bool is_artificial = ((arg_num >= func_type->num_fields ())
                        ? true
-                       : TYPE_FIELD_ARTIFICIAL (func_type, arg_num));
+                       : func_type->field (arg_num).is_artificial ());
 
   /* If this is an artificial argument, then either, this is an argument
      beyond the end of the known arguments, or possibly, there are no known