gdb: fix invalid arg coercion when calling static member functions
[deliverable/binutils-gdb.git] / gdb / infcall.c
index ca3347fbb9dec1852856c03b6f3dca4e5638112e..40298fb1318604a7bb301ad163427640c6b85cee 100644 (file)
@@ -1026,8 +1026,8 @@ call_function_by_hand_dummy (struct value *function,
         prototyped.  Can we respect TYPE_VARARGS?  Probably not.  */
       if (ftype->code () == TYPE_CODE_METHOD)
        prototyped = 1;
-      if (TYPE_TARGET_TYPE (ftype) == NULL && ftype->num_fields () == 0
-         && default_return_type != NULL)
+      else if (TYPE_TARGET_TYPE (ftype) == NULL && ftype->num_fields () == 0
+              && default_return_type != NULL)
        {
          /* Calling a no-debug function with the return type
             explicitly cast.  Assume the function is prototyped,
This page took 0.039681 seconds and 4 git commands to generate.