This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: fix build buglet
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 14 Mar 2011 09:53:57 -0600
- Subject: FYI: fix build buglet
I am checking this in on the trunk and the 7.2 branch.
PR 12576 reports that we have a `return EXPR' in a void-valued
function. GCC allows this, but other compilers do not.
I would have thought that -Wreturn-type (implied by -Wall) would have
caught this, but apparently not. I'm investigating whether I should
report a GCC bug.
Built on x86 F13.
Tom
2011-03-14 Tom Tromey <tromey@redhat.com>
PR gdb/12576:
* dwarf2loc.c (dwarf_expr_dwarf_call): Remove 'return'.
(needs_frame_dwarf_call): Likewise.
Index: dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.111
diff -u -r1.111 dwarf2loc.c
--- dwarf2loc.c 7 Mar 2011 20:06:12 -0000 1.111
+++ dwarf2loc.c 14 Mar 2011 15:34:03 -0000
@@ -282,8 +282,8 @@
{
struct dwarf_expr_baton *debaton = ctx->baton;
- return per_cu_dwarf_call (ctx, die_offset, debaton->per_cu,
- ctx->get_frame_pc, ctx->baton);
+ per_cu_dwarf_call (ctx, die_offset, debaton->per_cu,
+ ctx->get_frame_pc, ctx->baton);
}
struct piece_closure
@@ -1274,8 +1274,8 @@
{
struct needs_frame_baton *nf_baton = ctx->baton;
- return per_cu_dwarf_call (ctx, die_offset, nf_baton->per_cu,
- ctx->get_frame_pc, ctx->baton);
+ per_cu_dwarf_call (ctx, die_offset, nf_baton->per_cu,
+ ctx->get_frame_pc, ctx->baton);
}
/* Return non-zero iff the location expression at DATA (length SIZE)