diff options
author | Per Bothner <per@bothner.com> | 1996-01-24 00:50:11 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1996-01-24 00:50:11 +0000 |
commit | 9293e88698823b6ea4a43fc0cea53cc2d34b53f3 (patch) | |
tree | 48456635716c8406f55ff1ed632129965d1f149a /gdb/ch-exp.c | |
parent | 533bda77040578d94e4151d6b5f9bbe63c7a9d9d (diff) | |
download | gdb-9293e88698823b6ea4a43fc0cea53cc2d34b53f3.zip gdb-9293e88698823b6ea4a43fc0cea53cc2d34b53f3.tar.gz gdb-9293e88698823b6ea4a43fc0cea53cc2d34b53f3.tar.bz2 |
* ch-exp.c (parse_tuple): Error if invalid mode.
This fixes PR chill/8870.
Diffstat (limited to 'gdb/ch-exp.c')
-rw-r--r-- | gdb/ch-exp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c index 492f376..95021e7 100644 --- a/gdb/ch-exp.c +++ b/gdb/ch-exp.c @@ -579,6 +579,11 @@ parse_tuple (mode) write_exp_elt_opcode (OP_ARRAY); if (mode) { + struct type *type = check_typedef (mode); + if (TYPE_CODE (type) != TYPE_CODE_ARRAY + && TYPE_CODE (type) != TYPE_CODE_STRUCT + && TYPE_CODE (type) != TYPE_CODE_SET) + error ("invalid tuple mode"); write_exp_elt_opcode (UNOP_CAST); write_exp_elt_type (mode); write_exp_elt_opcode (UNOP_CAST); |