aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2007-08-15 18:36:37 +0000
committerJoel Brobecker <brobecker@gnat.com>2007-08-15 18:36:37 +0000
commitee90b9ab362f9a71b990d15627271bd5bbe81668 (patch)
tree6c5e0637a55fc33c7757bd90e172c2fc43516970 /gdb/ada-lang.c
parentd10e7fcce7bfc7202889ba01137476635a472b5b (diff)
downloadgdb-ee90b9ab362f9a71b990d15627271bd5bbe81668.zip
gdb-ee90b9ab362f9a71b990d15627271bd5bbe81668.tar.gz
gdb-ee90b9ab362f9a71b990d15627271bd5bbe81668.tar.bz2
* ada-lang.c (possible_user_operator_p): Alternative fix to last
checkin guarding against NULL.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 4b1e292..7f96dea 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -3532,14 +3532,7 @@ possible_user_operator_p (enum exp_opcode op, struct value *args[])
return (!(scalar_type_p (type0) && scalar_type_p (type1)));
case BINOP_CONCAT:
- return
- ((TYPE_CODE (type0) != TYPE_CODE_ARRAY
- && (TYPE_CODE (type0) != TYPE_CODE_PTR
- || TYPE_CODE (TYPE_TARGET_TYPE (type0)) != TYPE_CODE_ARRAY))
- || (type1 != NULL && TYPE_CODE (type1) != TYPE_CODE_ARRAY
- && (TYPE_CODE (type1) != TYPE_CODE_PTR
- || (TYPE_CODE (TYPE_TARGET_TYPE (type1))
- != TYPE_CODE_ARRAY))));
+ return !ada_is_array_type (type0) || !ada_is_array_type (type1);
case BINOP_EXP:
return (!(numeric_type_p (type0) && integer_type_p (type1)));