aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-11-08 19:08:34 +0000
committerMichael Snyder <msnyder@vmware.com>2001-11-08 19:08:34 +0000
commit3bf40917fcff912f97d389cf54180203fff13909 (patch)
tree460134298747519c7f5d83bd97ca6a222365d251 /gdb/testsuite
parentb57034379cde301426173ad050a987285c369f98 (diff)
downloadgdb-3bf40917fcff912f97d389cf54180203fff13909.zip
gdb-3bf40917fcff912f97d389cf54180203fff13909.tar.gz
gdb-3bf40917fcff912f97d389cf54180203fff13909.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.c15
-rw-r--r--gdb/testsuite/gdb.base/callfwmall.c15
3 files changed, 22 insertions, 14 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8e47b31..0716da1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
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".
diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c
index f53bd31..0fdc2fe 100644
--- a/gdb/testsuite/gdb.base/callfuncs.c
+++ b/gdb/testsuite/gdb.base/callfuncs.c
@@ -237,12 +237,13 @@ long long_arg1, long_arg2;
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
@@ -251,13 +252,13 @@ float float_arg1, float_arg2;
}
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
diff --git a/gdb/testsuite/gdb.base/callfwmall.c b/gdb/testsuite/gdb.base/callfwmall.c
index 550a970..89e6a77 100644
--- a/gdb/testsuite/gdb.base/callfwmall.c
+++ b/gdb/testsuite/gdb.base/callfwmall.c
@@ -244,12 +244,13 @@ long long_arg1, long_arg2;
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
@@ -258,13 +259,13 @@ float float_arg1, float_arg2;
}
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