aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-06-18 08:59:00 -0600
committerTom Tromey <tromey@adacore.com>2019-07-10 12:18:39 -0600
commit32372d80caba2e223157eca6db2fb0e65369c3c7 (patch)
tree8659842151ccf601f097e8aa31cba87f1b5a7898 /gdb/valops.c
parent43dd762689eb80d5c93a6c1079697c3791fb46fa (diff)
downloadgdb-32372d80caba2e223157eca6db2fb0e65369c3c7.zip
gdb-32372d80caba2e223157eca6db2fb0e65369c3c7.tar.gz
gdb-32372d80caba2e223157eca6db2fb0e65369c3c7.tar.bz2
Specialize value_cast error message for Ada
In Ada, the term for a cast is "type conversion". AdaCore has been carrying a local patch to specialize the error message in value_cast, but it seemed fine to me for this to be part of gdb. This also removes a dead "return" statement. gdb/ChangeLog 2019-07-10 Tom Tromey <tromey@adacore.com> * valops.c (value_cast): Specialize error message for Ada.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 663edae..82b54561 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -555,8 +555,9 @@ value_cast (struct type *type, struct value *arg2)
return value_at_lazy (to_type, value_address (arg2));
else
{
+ if (current_language->la_language == language_ada)
+ error (_("Invalid type conversion."));
error (_("Invalid cast."));
- return 0;
}
}