aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-03-14 16:31:28 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-03-14 16:31:28 +0000
commit2e12bf4fd16e4929b944a7fdabc40ba02e999b75 (patch)
treed91783f787ef8d6d304530952cd40e85de4a6d3d
parent36633dcc4a70d3b57829bff8120db8fe7423de09 (diff)
downloadfsf-binutils-gdb-2e12bf4fd16e4929b944a7fdabc40ba02e999b75.zip
fsf-binutils-gdb-2e12bf4fd16e4929b944a7fdabc40ba02e999b75.tar.gz
fsf-binutils-gdb-2e12bf4fd16e4929b944a7fdabc40ba02e999b75.tar.bz2
* valops.c (value_repeat), eval.c (evaluate_subexp_standard):
If VALUE_REPEATED is already set, just error out.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/valops.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a93c97f..025b256 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
Tue Mar 14 05:52:36 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * valops.c (value_repeat), eval.c (evaluate_subexp_standard):
+ If VALUE_REPEATED is already set, just error out.
+
* valops.c (value_cast, value_slice), parse.c (follow_types): Add
FIXME-type-allocation comments.
diff --git a/gdb/valops.c b/gdb/valops.c
index fdd94e5..ea0a343 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -608,6 +608,8 @@ value_repeat (arg1, count)
error ("Only values in memory can be extended with '@'.");
if (count < 1)
error ("Invalid number %d of repetitions.", count);
+ if (VALUE_REPEATED (arg1))
+ error ("Cannot create artificial arrays of artificial arrays.");
val = allocate_repeat_value (VALUE_TYPE (arg1), count);