This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: `pending_bincls' defined but not used


	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.  */
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]