From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/7] Add cast to exception_none
Date: Wed, 28 Oct 2015 17:57:00 -0000 [thread overview]
Message-ID: <1446044362-8655-3-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1446044362-8655-1-git-send-email-palves@redhat.com>
Fixes, in C++ mode:
../../src/gdb/common/common-exceptions.c:23:69: error: invalid conversion from âintâ to âreturn_reasonâ [-fpermissive]
const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL };
^
(I considered adding an enum value for '0', but the code and comments
around return_reason and its uses explain how 0 is special/internal,
so I'm leaving it be.)
gdb/ChangeLog:
2015-10-27 Pedro Alves <palves@redhat.com>
* common/common-exceptions.c (exception_none): Add cast.
---
gdb/common/common-exceptions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/common/common-exceptions.c b/gdb/common/common-exceptions.c
index 8ee96ab..ce476a2 100644
--- a/gdb/common/common-exceptions.c
+++ b/gdb/common/common-exceptions.c
@@ -20,7 +20,7 @@
#include "common-defs.h"
#include "common-exceptions.h"
-const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL };
+const struct gdb_exception exception_none = { (enum return_reason) 0, GDB_NO_ERROR, NULL };
#ifndef __cplusplus
--
1.9.3
next prev parent reply other threads:[~2015-10-28 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 16:48 [PATCH 0/7] C++ patches Pedro Alves
2015-10-28 16:55 ` [PATCH 1/7] compile: Rename struct type_map_instance::gcc_type field Pedro Alves
2015-10-28 17:05 ` [PATCH 6/7] gdbserver/tracepoint: Add casts out of tpoint->handle Pedro Alves
2015-10-28 17:10 ` [PATCH 3/7] gdbserver/Linux: Introduce NULL_REGSET Pedro Alves
2015-10-28 17:20 ` [PATCH 4/7] gdbserver: btrace enums Pedro Alves
2015-10-28 18:46 ` Metzger, Markus T
2015-10-29 14:42 ` Pedro Alves
2015-10-28 17:44 ` [PATCH 5/7] gdbserver: enum gdb_signal casts Pedro Alves
2015-10-28 17:57 ` Pedro Alves [this message]
2015-10-28 18:24 ` [PATCH 7/7] gdbserver/mem-break.c: Add cast Pedro Alves
2015-10-29 15:32 ` [PATCH 0/7] C++ patches Pedro Alves
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=1446044362-8655-3-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@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: link
Be 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