This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C only] PR4076 -Wunused doesn't warn about static function only called by itself
- From: Andreas Schwab <schwab at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Manuel L ópez-Ibáñez <lopezibanez at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 01 Jul 2007 17:29:12 +0200
- Subject: Re: [C only] PR4076 -Wunused doesn't warn about static function only called by itself
- References: <6c33472e0705191807o97ad417v2a54cf0c1e671945@mail.gmail.com> <6c33472e0706190642k74183a0ck73f4bb792e5cbfa1@mail.gmail.com> <Pine.LNX.4.64.0706191348280.13153@digraph.polyomino.org.uk> <46782827.2080202@codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
> Joseph S. Myers wrote:
>> On Tue, 19 Jun 2007, Manuel López-Ibáñez wrote:
>>
>>> PING: http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01298.html
>>
>> The C front-end part of this patch is OK. I can't approve the calls.c
>> part.
>
> That part is OK too.
And this fixes the bootstrap failure on ia64. Installed as obvious.
Andreas.
2007-07-01 Andreas Schwab <schwab@suse.de>
* dwarf2out.c (initial_return_save): Define only if used.
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c (revision 126166)
+++ gcc/dwarf2out.c (working copy)
@@ -347,7 +347,9 @@ static void add_fde_cfi (const char *, d
static void lookup_cfa_1 (dw_cfi_ref, dw_cfa_location *);
static void lookup_cfa (dw_cfa_location *);
static void reg_save (const char *, unsigned, unsigned, HOST_WIDE_INT);
+#ifdef DWARF2_UNWIND_INFO
static void initial_return_save (rtx);
+#endif
static HOST_WIDE_INT stack_adjust_offset (rtx);
static void output_cfi (dw_cfi_ref, dw_fde_ref, int);
static void output_call_frame_info (int);
@@ -955,6 +957,7 @@ dwarf2out_return_reg (const char *label,
reg_save (label, DWARF_FRAME_RETURN_COLUMN, DWARF_FRAME_REGNUM (sreg), 0);
}
+#ifdef DWARF2_UNWIND_INFO
/* Record the initial position of the return address. RTL is
INCOMING_RETURN_ADDR_RTX. */
@@ -1012,6 +1015,7 @@ initial_return_save (rtx rtl)
if (reg != DWARF_FRAME_RETURN_COLUMN)
reg_save (NULL, DWARF_FRAME_RETURN_COLUMN, reg, offset - cfa.offset);
}
+#endif
/* Given a SET, calculate the amount of stack adjustment it
contains. */
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."