aboutsummaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-04-06 21:20:30 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-04-06 21:20:30 +0000
commit9925b9286107fabdb193a9ba47f330d6944195b4 (patch)
treec068e7b92f04c08abd6cdb61b4b0fe5624f0c372 /gdb/values.c
parent6755c51e9344d8a20dfa33e3738b1c3cf77a5465 (diff)
downloadgdb-9925b9286107fabdb193a9ba47f330d6944195b4.zip
gdb-9925b9286107fabdb193a9ba47f330d6944195b4.tar.gz
gdb-9925b9286107fabdb193a9ba47f330d6944195b4.tar.bz2
* values.c (USE_STRUCT_RETURN): Only use gcc wierdness for gcc1.
Diffstat (limited to 'gdb/values.c')
-rw-r--r--gdb/values.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gdb/values.c b/gdb/values.c
index 12f8ce9..58c19bf 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1484,13 +1484,21 @@ value_being_returned (valtype, retbuf, struct_return)
On most machines, the struct convention is used unless we are
using gcc and the type is of a special size. */
+/* 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. */
#if !defined (USE_STRUCT_CONVENTION)
#define USE_STRUCT_CONVENTION(gcc_p, type)\
- (!((gcc_p) && (TYPE_LENGTH (value_type) == 1 \
- || TYPE_LENGTH (value_type) == 2 \
- || TYPE_LENGTH (value_type) == 4 \
- || TYPE_LENGTH (value_type) == 8 \
- ) \
+ (!((gcc_p == 1) && (TYPE_LENGTH (value_type) == 1 \
+ || TYPE_LENGTH (value_type) == 2 \
+ || TYPE_LENGTH (value_type) == 4 \
+ || TYPE_LENGTH (value_type) == 8 \
+ ) \
))
#endif