From a781f4011250a7d6450025a92336250044ab46eb Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 2 Aug 2005 18:03:17 +0000 Subject: 2005-08-02 Frank Ch. Eigler * loc2.c (emit_loc_address): Emit interleaved declaration into its own nested { } block. * tapsets.cxx (literal_stmt_for_local): Emit deref_fault block unconditionally. * tapset/builtin_hexstring.stp: New builtin. * testsuite/buildok/six.stp: New test. --- tapsets.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index a51efad7..780f4c4f 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -581,15 +581,17 @@ dwflpp assert(memstream); bool deref = c_emit_location (memstream, head, 1); + fprintf(memstream, " goto out;\n"); - fprintf(memstream, "goto out;\n"); - if (deref) - { - fprintf(memstream, - "deref_fault:\n" - " c->errorcount++; \n" - " goto out;\n\n"); - } + // dummy use of deref_fault label, to disable warning if deref() not used + fprintf(memstream, "if (0) goto deref_fault;\n"); + + // XXX: deref flag not reliable; emit fault label unconditionally + if (deref) ; + fprintf(memstream, + "deref_fault:\n" + " c->errorcount++; \n" + " goto out;\n"); fclose (memstream); string result(buf); -- cgit