This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: `pending_bincls' defined but not used
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 02 Jul 2003 13:52:50 -0400
- Subject: Re: `pending_bincls' defined but not used
- References: <jed6gtcg47.fsf@sykes.suse.de>
Your patch just covered up the problem and created more errors:
dbxout.c is use for more than just DBX_DEBUGGING_INFO. I have committed
the following patch.
* dbxout.c (pending_bincls): Guard with DBX_USE_BINCLS.
(emit_bincl_stab): Same.
(emit_pending_bincls): Same.
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.149
diff -c -p -r1.149 dbxout.c
*** dbxout.c 2 Jul 2003 11:40:12 -0000 1.149
--- dbxout.c 2 Jul 2003 17:47:05 -0000
*************** struct dbx_file GTY(())
*** 195,201 ****
struct dbx_file *prev; /* Chain to traverse all pending bincls. */
};
! #ifdef DBX_DEBUGGING_INFO
/* If zero then there is no pending BINCL. */
static int pending_bincls = 0;
#endif
--- 195,201 ----
struct dbx_file *prev; /* Chain to traverse all pending bincls. */
};
! #ifdef DBX_USE_BINCLS
/* If zero then there is no pending BINCL. */
static int pending_bincls = 0;
#endif
*************** static int current_sym_nchars;
*** 317,324 ****
--- 317,326 ----
#define CONTIN do { } while (0)
#endif
+ #ifdef DBX_USE_BINCLS
static void emit_bincl_stab (const char *c);
static void emit_pending_bincls (void);
+ #endif
static inline void emit_pending_bincls_if_required (void);
static void dbxout_init (const char *);
*************** dbxout_typedefs (tree syms)
*** 559,564 ****
--- 561,567 ----
}
}
+ #ifdef DBX_USE_BINCL
/* Emit BINCL stab using given name. */
static void
emit_bincl_stab (const char *name)
*************** emit_bincl_stab (const char *name)
*** 573,582 ****
static inline void
emit_pending_bincls_if_required ()
{
- #ifdef DBX_USE_BINCL
if (pending_bincls)
emit_pending_bincls ();
- #endif
}
/* Emit all pending bincls. */
--- 576,583 ----
*************** emit_pending_bincls ()
*** 611,616 ****
--- 612,623 ----
/* All pending bincls have been emitted. */
pending_bincls = 0;
}
+
+ #else
+
+ static inline void
+ emit_pending_bincls_if_required () {}
+ #endif
/* Change to reading from a new source file. Generate a N_BINCL stab. */