gdb: rank an lvalue argument incompatible for an rvalue parameter
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index 508628af1f73a99d66b0eec75788c042635432bb..0896f7189fdcdfdd1043ff5e4d6c212a4bd90f89 100644 (file)
@@ -4303,12 +4303,9 @@ rank_one_type (struct type *parm, struct type *arg, struct value *value)
        }
       else
        {
-         /* Lvalues should prefer lvalue overloads.  */
+         /* It's illegal to pass an lvalue as an rvalue.  */
          if (TYPE_CODE (parm) == TYPE_CODE_RVALUE_REF)
-           {
-             rank.subrank = REFERENCE_CONVERSION_RVALUE;
-             return sum_ranks (rank, REFERENCE_CONVERSION_BADNESS);
-           }
+           return INCOMPATIBLE_TYPE_BADNESS;
        }
     }
 
This page took 0.026657 seconds and 4 git commands to generate.