public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Specialize value_cast error message for Ada Date: Wed, 10 Jul 2019 18:20:00 -0000 [thread overview] Message-ID: <20190710182059.63897.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=32372d80caba2e223157eca6db2fb0e65369c3c7 commit 32372d80caba2e223157eca6db2fb0e65369c3c7 Author: Tom Tromey <tromey@adacore.com> Date: Tue Jun 18 08:59:00 2019 -0600 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. Diff: --- gdb/ChangeLog | 4 ++++ gdb/valops.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c4db196..410a8d8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-07-10 Tom Tromey <tromey@adacore.com> + + * valops.c (value_cast): Specialize error message for Ada. + 2019-07-10 Simon Marchi <simon.marchi@polymtl.ca> * breakpoint.c (breakpoint_1): Update doc and parameter names. 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; } }
reply other threads:[~2019-07-10 18:20 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190710182059.63897.qmail@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).