2001-11-07 Michael Snyder <msnyder@redhat.com>
+ * gdb.base/callfuncs.c (t_float_values): This function must
+ _not_ be prototyped, and the following function (t_float_values2)
+ must be prototyped (if the compiler supports it), so that GDB
+ can be tested against both cases. Usually one case involves
+ promotion of float to double, while the other does not.
+ * gdb.base/callfwmall.c: Ditto.
* gdb.asm/asm-source.exp (bt ALL in foo2): Accept a backtrace that
includes a stack frame for "start".
return ((long_arg1 == long_val1) && (long_arg2 == long_val2));
}
-#ifdef PROTOTYPES
-int t_float_values (float float_arg1, float float_arg2)
-#else
+/* NOTE: THIS FUNCTION MUST NOT BE PROTOTYPED!!!!!
+ There must be one version of "t_float_values" (this one)
+ that is not prototyped, and one (if supported) that is (following).
+ That way GDB can be tested against both cases. */
+
int t_float_values (float_arg1, float_arg2)
float float_arg1, float_arg2;
-#endif
{
return ((float_arg1 - float_val1) < DELTA
&& (float_arg1 - float_val1) > -DELTA
}
int
-#ifdef PROTOTYPES
-t_float_values2 (float float_arg1, float float_arg2)
-#else
+#ifdef NO_PROTOTYPES
/* In this case we are just duplicating t_float_values, but that is the
easiest way to deal with either ANSI or non-ANSI. */
t_float_values2 (float_arg1, float_arg2)
float float_arg1, float_arg2;
+#else
+t_float_values2 (float float_arg1, float float_arg2)
#endif
{
return ((float_arg1 - float_val1) < DELTA
return ((long_arg1 == long_val1) && (long_arg2 == long_val2));
}
-#ifdef PROTOTYPES
-int t_float_values (float float_arg1, float float_arg2)
-#else
+/* NOTE: THIS FUNCTION MUST NOT BE PROTOTYPED!!!!!
+ There must be one version of "t_float_values" (this one)
+ that is not prototyped, and one (if supported) that is (following).
+ That way GDB can be tested against both cases. */
+
int t_float_values (float_arg1, float_arg2)
float float_arg1, float_arg2;
-#endif
{
return ((float_arg1 - float_val1) < DELTA
&& (float_arg1 - float_val1) > -DELTA
}
int
-#ifdef PROTOTYPES
-t_float_values2 (float float_arg1, float float_arg2)
-#else
+#ifdef NO_PROTOTYPES
/* In this case we are just duplicating t_float_values, but that is the
easiest way to deal with either ANSI or non-ANSI. */
t_float_values2 (float_arg1, float_arg2)
float float_arg1, float_arg2;
+#else
+t_float_values2 (float float_arg1, float float_arg2)
#endif
{
return ((float_arg1 - float_val1) < DELTA