This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [all pushed] Re: [PATCH 00/36] Support building GDB as a C++ program
- From: asmwarrior <asmwarrior at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Fri, 15 May 2015 16:32:56 +0800
- Subject: Re: [all pushed] Re: [PATCH 00/36] Support building GDB as a C++ program
- Authentication-results: sourceware.org; auth=none
- References: <1423524046-20605-1-git-send-email-palves at redhat dot com> <54F0B52F dot 1050909 at redhat dot com> <54FB20E2 dot 2040403 at redhat dot com> <54FB3C58 dot 6050702 at redhat dot com> <550660C5 dot 2060009 at gmail dot com> <5506661C dot 1040103 at gmail dot com> <5506C18C dot 9080408 at redhat dot com> <5555AC9F dot 7020206 at gmail dot com>
There is another one build error:
In file included from ../../../binutils-gdb/gdb/gdbserver/server.h:61:0,
from ../../../binutils-gdb/gdb/gdbserver/server.c:19:
../../../binutils-gdb/gdb/gdbserver/target.h:442:50: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void'
(*the_target->handle_new_gdb_connection) () : 0)
^
The second operand is a function call which return void, so I have a simply changed the third operand like below: (maybe, we just need a simple if statement instead the conditional operator)
Yuanhui Zhang
Here is the patch:
gdb/gdbserver/target.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index 8d23383..4affedf 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -439,7 +439,7 @@ int kill_inferior (int);
#define target_handle_new_gdb_connection() \
(the_target->handle_new_gdb_connection ? \
- (*the_target->handle_new_gdb_connection) () : 0)
+ (*the_target->handle_new_gdb_connection) () : (void)0)
#define detach_inferior(pid) \
(*the_target->detach) (pid)