This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Delete gcc 1.x relic
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 13 Jun 2004 11:24:39 -0400
- Subject: [commit] Delete gcc 1.x relic
Hello,
As this comment explains:
/* As of about 31 Mar 93, GCC was changed to be compatible with the
native compiler. GCC 2.3.3 was the last release that did it the
old way. Since gcc2_compiled was not changed, we have no
way to correctly win in all cases, so we just do the right thing
for gcc1 and for gcc2 after this change. Thus it loses for gcc
2.0-2.3.3. This is somewhat unfortunate, but changing gcc2_compiled
would cause more chaos than dealing with some struct returns being
handled wrong. */
the gcc_p check was ment to detect GCC<=2.3.3 but in reality detected
GCC<2.0. I hardly think that we care about GCC-1.x so I've deleted the
logic (I hardly think we care about GCC-2.3.3 either but don't worry
about that ;-).
Note that since this was the only [legacy] use_struct_convention method
still checking its gcc_p parameter, we can expect further fallout.
committed,
Andrew
2004-06-13 Andrew Cagney <cagney@gnu.org>
* values.c (generic_use_struct_convention): Don't check gcc_p.
Index: values.c
===================================================================
RCS file: /cvs/src/src/gdb/values.c,v
retrieving revision 1.67
diff -p -u -r1.67 values.c
--- values.c 13 Jun 2004 13:42:32 -0000 1.67
+++ values.c 13 Jun 2004 15:12:12 -0000
@@ -1217,15 +1217,16 @@ value_from_double (struct type *type, DO
2.0-2.3.3. This is somewhat unfortunate, but changing gcc2_compiled
would cause more chaos than dealing with some struct returns being
handled wrong. */
+/* NOTE: cagney/2004-06-13: Deleted check for "gcc_p". GCC 1.x is
+ dead. */
int
generic_use_struct_convention (int gcc_p, struct type *value_type)
{
- return !((gcc_p == 1)
- && (TYPE_LENGTH (value_type) == 1
- || TYPE_LENGTH (value_type) == 2
- || TYPE_LENGTH (value_type) == 4
- || TYPE_LENGTH (value_type) == 8));
+ return !(TYPE_LENGTH (value_type) == 1
+ || TYPE_LENGTH (value_type) == 2
+ || TYPE_LENGTH (value_type) == 4
+ || TYPE_LENGTH (value_type) == 8);
}
/* Return true if the function returning the specified type is using