OSDN Git Service

2003-10-17 Kelley Cook <kcook@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / dwarfout.c
index 9c720db..5200af5 100644 (file)
@@ -1,6 +1,6 @@
-/* Output Dwarf format symbol table information from the GNU C compiler.
-   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 2002,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Output Dwarf format symbol table information from GCC.
+   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002, 2003 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com) of Network Computing Devices.
 
 This file is part of GCC.
@@ -162,7 +162,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  is required by the current DWARF draft specification.
 
  Specifically, the current DWARF draft specification seems to require that
- the type of an non-unsigned integral bit-field member of a struct or union
+ the type of a non-unsigned integral bit-field member of a struct or union
  type be represented as either a "signed" type or as a "plain" type,
  depending upon the exact set of keywords that were used in the
  type specification for the given bit-field member.  It was felt (by the
@@ -563,9 +563,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 */
 
 #include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 
 #ifdef DWARF_DEBUGGING_INFO
-#include "system.h"
 #include "dwarf.h"
 #include "tree.h"
 #include "flags.h"
@@ -579,6 +581,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "toplev.h"
 #include "tm_p.h"
 #include "debug.h"
+#include "target.h"
 #include "langhooks.h"
 
 /* NOTE: In the comments in this file, many references are made to
@@ -594,12 +597,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define ASM_COMMENT_START ";#"
 #endif
 
-/* How to print out a register name.  */
-#ifndef PRINT_REG
-#define PRINT_REG(RTX, CODE, FILE) \
-  fprintf ((FILE), "%s", reg_names[REGNO (RTX)])
-#endif
-
 /* Define a macro which returns nonzero for any tagged type which is
    used (directly or indirectly) in the specification of either some
    function's return type or some formal parameter of some function.
@@ -772,158 +769,157 @@ static int in_class;
 
 /* Forward declarations for functions defined in this file.  */
 
-static void dwarfout_init              PARAMS ((const char *));
-static void dwarfout_finish            PARAMS ((const char *));
-static void dwarfout_define            PARAMS ((unsigned int, const char *));
-static void dwarfout_undef             PARAMS ((unsigned int, const char *));
-static void dwarfout_start_source_file PARAMS ((unsigned, const char *));
-static void dwarfout_start_source_file_check PARAMS ((unsigned, const char *));
-static void dwarfout_end_source_file   PARAMS ((unsigned));
-static void dwarfout_end_source_file_check PARAMS ((unsigned));
-static void dwarfout_begin_block       PARAMS ((unsigned, unsigned));
-static void dwarfout_end_block         PARAMS ((unsigned, unsigned));
-static void dwarfout_end_epilogue      PARAMS ((unsigned int, const char *));
-static void dwarfout_source_line       PARAMS ((unsigned int, const char *));
-static void dwarfout_end_prologue      PARAMS ((unsigned int, const char *));
-static void dwarfout_end_function      PARAMS ((unsigned int));
-static void dwarfout_function_decl     PARAMS ((tree));
-static void dwarfout_global_decl       PARAMS ((tree));
-static void dwarfout_deferred_inline_function  PARAMS ((tree));
-static void dwarfout_file_scope_decl   PARAMS ((tree , int));
-static const char *dwarf_tag_name      PARAMS ((unsigned));
-static const char *dwarf_attr_name     PARAMS ((unsigned));
-static const char *dwarf_stack_op_name PARAMS ((unsigned));
-static const char *dwarf_typemod_name  PARAMS ((unsigned));
-static const char *dwarf_fmt_byte_name PARAMS ((unsigned));
-static const char *dwarf_fund_type_name        PARAMS ((unsigned));
-static tree decl_ultimate_origin       PARAMS ((tree));
-static tree block_ultimate_origin      PARAMS ((tree));
-static tree decl_class_context                 PARAMS ((tree));
+static void dwarfout_init (const char *);
+static void dwarfout_finish (const char *);
+static void dwarfout_define (unsigned int, const char *);
+static void dwarfout_undef (unsigned int, const char *);
+static void dwarfout_start_source_file (unsigned, const char *);
+static void dwarfout_start_source_file_check (unsigned, const char *);
+static void dwarfout_end_source_file (unsigned);
+static void dwarfout_end_source_file_check (unsigned);
+static void dwarfout_begin_block (unsigned, unsigned);
+static void dwarfout_end_block (unsigned, unsigned);
+static void dwarfout_end_epilogue (unsigned int, const char *);
+static void dwarfout_source_line (unsigned int, const char *);
+static void dwarfout_end_prologue (unsigned int, const char *);
+static void dwarfout_end_function (unsigned int);
+static void dwarfout_function_decl (tree);
+static void dwarfout_global_decl (tree);
+static void dwarfout_deferred_inline_function (tree);
+static void dwarfout_file_scope_decl (tree , int);
+static const char *dwarf_tag_name (unsigned);
+static const char *dwarf_attr_name (unsigned);
+static const char *dwarf_stack_op_name (unsigned);
+static const char *dwarf_typemod_name (unsigned);
+static const char *dwarf_fmt_byte_name (unsigned);
+static const char *dwarf_fund_type_name (unsigned);
+static tree decl_ultimate_origin (tree);
+static tree block_ultimate_origin (tree);
+static tree decl_class_context (tree);
 #if 0
-static void output_unsigned_leb128     PARAMS ((unsigned long));
-static void output_signed_leb128       PARAMS ((long));
+static void output_unsigned_leb128 (unsigned long);
+static void output_signed_leb128 (long);
 #endif
-static int fundamental_type_code       PARAMS ((tree));
-static tree root_type_1                        PARAMS ((tree, int));
-static tree root_type                  PARAMS ((tree));
-static void write_modifier_bytes_1     PARAMS ((tree, int, int, int));
-static void write_modifier_bytes       PARAMS ((tree, int, int));
-static inline int type_is_fundamental  PARAMS ((tree));
-static void equate_decl_number_to_die_number PARAMS ((tree));
-static inline void equate_type_number_to_die_number PARAMS ((tree));
-static void output_reg_number          PARAMS ((rtx));
-static void output_mem_loc_descriptor  PARAMS ((rtx));
-static void output_loc_descriptor      PARAMS ((rtx));
-static void output_bound_representation        PARAMS ((tree, unsigned, int));
-static void output_enumeral_list       PARAMS ((tree));
-static inline HOST_WIDE_INT ceiling    PARAMS ((HOST_WIDE_INT, unsigned int));
-static inline tree field_type          PARAMS ((tree));
-static inline unsigned int simple_type_align_in_bits PARAMS ((tree));
-static inline unsigned HOST_WIDE_INT simple_type_size_in_bits  PARAMS ((tree));
-static HOST_WIDE_INT field_byte_offset PARAMS ((tree));
-static inline void sibling_attribute   PARAMS ((void));
-static void location_attribute         PARAMS ((rtx));
-static void data_member_location_attribute PARAMS ((tree));
-static void const_value_attribute      PARAMS ((rtx));
-static void location_or_const_value_attribute PARAMS ((tree));
-static inline void name_attribute      PARAMS ((const char *));
-static inline void fund_type_attribute PARAMS ((unsigned));
-static void mod_fund_type_attribute    PARAMS ((tree, int, int));
-static inline void user_def_type_attribute PARAMS ((tree));
-static void mod_u_d_type_attribute     PARAMS ((tree, int, int));
+static int fundamental_type_code (tree);
+static tree root_type_1 (tree, int);
+static tree root_type (tree);
+static void write_modifier_bytes_1 (tree, int, int, int);
+static void write_modifier_bytes (tree, int, int);
+static inline int type_is_fundamental (tree);
+static void equate_decl_number_to_die_number (tree);
+static inline void equate_type_number_to_die_number (tree);
+static void output_reg_number (rtx);
+static void output_mem_loc_descriptor (rtx);
+static void output_loc_descriptor (rtx);
+static void output_bound_representation (tree, unsigned, char);
+static void output_enumeral_list (tree);
+static inline HOST_WIDE_INT ceiling (HOST_WIDE_INT, unsigned int);
+static inline tree field_type (tree);
+static inline unsigned int simple_type_align_in_bits (tree);
+static inline unsigned HOST_WIDE_INT simple_type_size_in_bits (tree);
+static HOST_WIDE_INT field_byte_offset (tree);
+static inline void sibling_attribute (void);
+static void location_attribute (rtx);
+static void data_member_location_attribute (tree);
+static void const_value_attribute (rtx);
+static void location_or_const_value_attribute (tree);
+static inline void name_attribute (const char *);
+static inline void fund_type_attribute (unsigned);
+static void mod_fund_type_attribute (tree, int, int);
+static inline void user_def_type_attribute (tree);
+static void mod_u_d_type_attribute (tree, int, int);
 #ifdef USE_ORDERING_ATTRIBUTE
-static inline void ordering_attribute  PARAMS ((unsigned));
+static inline void ordering_attribute (unsigned);
 #endif /* defined(USE_ORDERING_ATTRIBUTE) */
-static void subscript_data_attribute   PARAMS ((tree));
-static void byte_size_attribute                PARAMS ((tree));
-static inline void bit_offset_attribute        PARAMS ((tree));
-static inline void bit_size_attribute  PARAMS ((tree));
-static inline void element_list_attribute PARAMS ((tree));
-static inline void stmt_list_attribute PARAMS ((const char *));
-static inline void low_pc_attribute    PARAMS ((const char *));
-static inline void high_pc_attribute   PARAMS ((const char *));
-static inline void body_begin_attribute        PARAMS ((const char *));
-static inline void body_end_attribute  PARAMS ((const char *));
-static inline void language_attribute  PARAMS ((unsigned));
-static inline void member_attribute    PARAMS ((tree));
+static void subscript_data_attribute (tree);
+static void byte_size_attribute (tree);
+static inline void bit_offset_attribute (tree);
+static inline void bit_size_attribute (tree);
+static inline void element_list_attribute (tree);
+static inline void stmt_list_attribute (const char *);
+static inline void low_pc_attribute (const char *);
+static inline void high_pc_attribute (const char *);
+static inline void body_begin_attribute (const char *);
+static inline void body_end_attribute (const char *);
+static inline void language_attribute (unsigned);
+static inline void member_attribute (tree);
 #if 0
-static inline void string_length_attribute PARAMS ((tree));
+static inline void string_length_attribute (tree);
 #endif
-static inline void comp_dir_attribute  PARAMS ((const char *));
-static inline void sf_names_attribute  PARAMS ((const char *));
-static inline void src_info_attribute  PARAMS ((const char *));
-static inline void mac_info_attribute  PARAMS ((const char *));
-static inline void prototyped_attribute        PARAMS ((tree));
-static inline void producer_attribute  PARAMS ((const char *));
-static inline void inline_attribute    PARAMS ((tree));
-static inline void containing_type_attribute PARAMS ((tree));
-static inline void abstract_origin_attribute PARAMS ((tree));
+static inline void comp_dir_attribute (const char *);
+static inline void sf_names_attribute (const char *);
+static inline void src_info_attribute (const char *);
+static inline void mac_info_attribute (const char *);
+static inline void prototyped_attribute (tree);
+static inline void producer_attribute (const char *);
+static inline void inline_attribute (tree);
+static inline void containing_type_attribute (tree);
+static inline void abstract_origin_attribute (tree);
 #ifdef DWARF_DECL_COORDINATES
-static inline void src_coords_attribute PARAMS ((unsigned, unsigned));
+static inline void src_coords_attribute (unsigned, unsigned);
 #endif /* defined(DWARF_DECL_COORDINATES) */
-static inline void pure_or_virtual_attribute PARAMS ((tree));
-static void name_and_src_coords_attributes PARAMS ((tree));
-static void type_attribute             PARAMS ((tree, int, int));
-static const char *type_tag            PARAMS ((tree));
-static inline void dienum_push         PARAMS ((void));
-static inline void dienum_pop          PARAMS ((void));
-static inline tree member_declared_type PARAMS ((tree));
-static const char *function_start_label        PARAMS ((tree));
-static void output_array_type_die      PARAMS ((void *));
-static void output_set_type_die                PARAMS ((void *));
+static inline void pure_or_virtual_attribute (tree);
+static void name_and_src_coords_attributes (tree);
+static void type_attribute (tree, int, int);
+static const char *type_tag (tree);
+static inline void dienum_push (void);
+static inline void dienum_pop (void);
+static inline tree member_declared_type (tree);
+static const char *function_start_label (tree);
+static void output_array_type_die (void *);
+static void output_set_type_die (void *);
 #if 0
-static void output_entry_point_die     PARAMS ((void *));
+static void output_entry_point_die (void *);
 #endif
-static void output_inlined_enumeration_type_die PARAMS ((void *));
-static void output_inlined_structure_type_die PARAMS ((void *));
-static void output_inlined_union_type_die PARAMS ((void *));
-static void output_enumeration_type_die        PARAMS ((void *));
-static void output_formal_parameter_die        PARAMS ((void *));
-static void output_global_subroutine_die PARAMS ((void *));
-static void output_global_variable_die PARAMS ((void *));
-static void output_label_die           PARAMS ((void *));
-static void output_lexical_block_die   PARAMS ((void *));
-static void output_inlined_subroutine_die PARAMS ((void *));
-static void output_local_variable_die  PARAMS ((void *));
-static void output_member_die          PARAMS ((void *));
+static void output_inlined_enumeration_type_die (void *);
+static void output_inlined_structure_type_die (void *);
+static void output_inlined_union_type_die (void *);
+static void output_enumeration_type_die (void *);
+static void output_formal_parameter_die (void *);
+static void output_global_subroutine_die (void *);
+static void output_global_variable_die (void *);
+static void output_label_die (void *);
+static void output_lexical_block_die (void *);
+static void output_inlined_subroutine_die (void *);
+static void output_local_variable_die (void *);
+static void output_member_die (void *);
 #if 0
-static void output_pointer_type_die    PARAMS ((void *));
-static void output_reference_type_die  PARAMS ((void *));
+static void output_pointer_type_die (void *);
+static void output_reference_type_die (void *);
 #endif
-static void output_ptr_to_mbr_type_die PARAMS ((void *));
-static void output_compile_unit_die    PARAMS ((void *));
-static void output_string_type_die     PARAMS ((void *));
-static void output_inheritance_die     PARAMS ((void *));
-static void output_structure_type_die  PARAMS ((void *));
-static void output_local_subroutine_die PARAMS ((void *));
-static void output_subroutine_type_die PARAMS ((void *));
-static void output_typedef_die         PARAMS ((void *));
-static void output_union_type_die      PARAMS ((void *));
-static void output_unspecified_parameters_die PARAMS ((void *));
-static void output_padded_null_die     PARAMS ((void *));
-static void output_die                 PARAMS ((void (*)(void *), void *));
-static void end_sibling_chain          PARAMS ((void));
-static void output_formal_types                PARAMS ((tree));
-static void pend_type                  PARAMS ((tree));
-static int type_ok_for_scope           PARAMS ((tree, tree));
-static void output_pending_types_for_scope PARAMS ((tree));
-static void output_type                        PARAMS ((tree, tree));
-static void output_tagged_type_instantiation PARAMS ((tree));
-static void output_block               PARAMS ((tree, int));
-static void output_decls_for_scope     PARAMS ((tree, int));
-static void output_decl                        PARAMS ((tree, tree));
-static void shuffle_filename_entry     PARAMS ((filename_entry *));
-static void generate_new_sfname_entry  PARAMS ((void));
-static unsigned lookup_filename                PARAMS ((const char *));
-static void generate_srcinfo_entry     PARAMS ((unsigned, unsigned));
-static void generate_macinfo_entry     PARAMS ((unsigned int, rtx,
-                                                const char *));
-static int is_pseudo_reg               PARAMS ((rtx));
-static tree type_main_variant          PARAMS ((tree));
-static int is_tagged_type              PARAMS ((tree));
-static int is_redundant_typedef                PARAMS ((tree));
-static void add_incomplete_type                PARAMS ((tree));
-static void retry_incomplete_types     PARAMS ((void));
+static void output_ptr_to_mbr_type_die (void *);
+static void output_compile_unit_die (void *);
+static void output_string_type_die (void *);
+static void output_inheritance_die (void *);
+static void output_structure_type_die (void *);
+static void output_local_subroutine_die (void *);
+static void output_subroutine_type_die (void *);
+static void output_typedef_die (void *);
+static void output_union_type_die (void *);
+static void output_unspecified_parameters_die (void *);
+static void output_padded_null_die (void *);
+static void output_die (void (*)(void *), void *);
+static void end_sibling_chain (void);
+static void output_formal_types (tree);
+static void pend_type (tree);
+static int type_ok_for_scope (tree, tree);
+static void output_pending_types_for_scope (tree);
+static void output_type (tree, tree);
+static void output_tagged_type_instantiation (tree);
+static void output_block (tree, int);
+static void output_decls_for_scope (tree, int);
+static void output_decl (tree, tree);
+static void shuffle_filename_entry (filename_entry *);
+static void generate_new_sfname_entry (void);
+static unsigned lookup_filename (const char *);
+static void generate_srcinfo_entry (unsigned, unsigned);
+static void generate_macinfo_entry (unsigned int, rtx, const char *);
+static int is_pseudo_reg (rtx);
+static tree type_main_variant (tree);
+static int is_tagged_type (tree);
+static int is_redundant_typedef (tree);
+static void add_incomplete_type (tree);
+static void retry_incomplete_types (void);
 \f
 /* Definitions of defaults for assembler-dependent names of various
    pseudo-ops and section names.
@@ -940,7 +936,7 @@ static void retry_incomplete_types  PARAMS ((void));
 #endif
 
 /* Pseudo-ops for pushing the current section onto the section stack (and
-   simultaneously changing to a new section) and for poping back to the
+   simultaneously changing to a new section) and for popping back to the
    section we were in immediately before this one.  Note that most svr4
    assemblers only maintain a one level stack... you can push all the
    sections you want, but you can only pop out one level.  (The sparc
@@ -1015,7 +1011,7 @@ static void retry_incomplete_types        PARAMS ((void));
    stock m88k/svr4 assembler, both of which need to see .L at the start of
    a label in order to prevent that label from going into the linker symbol
    table).  When I get time, I'll have to fix this the right way so that we
-   will use ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_INTERNAL_LABEL herein,
+   will use ASM_GENERATE_INTERNAL_LABEL and (*targetm.asm_out.internal_label) herein,
    but that will require a rather massive set of changes.  For the moment,
    the following definitions out to produce the right results for all svr4
    and svr3 assemblers. -- rfg
@@ -1291,14 +1287,14 @@ const struct gcc_debug_hooks dwarf_debug_hooks =
   dwarfout_global_decl,
   dwarfout_deferred_inline_function,
   debug_nothing_tree,          /* outlining_inline_function */
-  debug_nothing_rtx            /* label */
+  debug_nothing_rtx,           /* label */
+  debug_nothing_int            /* handle_pch */
 };
 \f
 /************************ general utility functions **************************/
 
 static inline int
-is_pseudo_reg (rtl)
-     rtx rtl;
+is_pseudo_reg (rtx rtl)
 {
   return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER))
          || ((GET_CODE (rtl) == SUBREG)
@@ -1306,8 +1302,7 @@ is_pseudo_reg (rtl)
 }
 
 static inline tree
-type_main_variant (type)
-     tree type;
+type_main_variant (tree type)
 {
   type = TYPE_MAIN_VARIANT (type);
 
@@ -1328,8 +1323,7 @@ type_main_variant (type)
 /* Return nonzero if the given type node represents a tagged type.  */
 
 static inline int
-is_tagged_type (type)
-     tree type;
+is_tagged_type (tree type)
 {
   enum tree_code code = TREE_CODE (type);
 
@@ -1338,8 +1332,7 @@ is_tagged_type (type)
 }
 
 static const char *
-dwarf_tag_name (tag)
-     unsigned tag;
+dwarf_tag_name (unsigned int tag)
 {
   switch (tag)
     {
@@ -1388,8 +1381,7 @@ dwarf_tag_name (tag)
 }
 
 static const char *
-dwarf_attr_name (attr)
-     unsigned attr;
+dwarf_attr_name (unsigned int attr)
 {
   switch (attr)
     {
@@ -1466,8 +1458,7 @@ dwarf_attr_name (attr)
 }
 
 static const char *
-dwarf_stack_op_name (op)
-     unsigned op;
+dwarf_stack_op_name (unsigned int op)
 {
   switch (op)
     {
@@ -1483,8 +1474,7 @@ dwarf_stack_op_name (op)
 }
 
 static const char *
-dwarf_typemod_name (mod)
-     unsigned mod;
+dwarf_typemod_name (unsigned int mod)
 {
   switch (mod)
     {
@@ -1497,8 +1487,7 @@ dwarf_typemod_name (mod)
 }
 
 static const char *
-dwarf_fmt_byte_name (fmt)
-     unsigned fmt;
+dwarf_fmt_byte_name (unsigned int fmt)
 {
   switch (fmt)
     {
@@ -1516,8 +1505,7 @@ dwarf_fmt_byte_name (fmt)
 }
 
 static const char *
-dwarf_fund_type_name (ft)
-     unsigned ft;
+dwarf_fund_type_name (unsigned int ft)
 {
   switch (ft)
     {
@@ -1582,8 +1570,7 @@ dwarf_fund_type_name (ft)
    served as the original seed for the given block.  */
 
 static tree
-decl_ultimate_origin (decl)
-     tree decl;
+decl_ultimate_origin (tree decl)
 {
 #ifdef ENABLE_CHECKING
   if (DECL_FROM_INLINE (DECL_ORIGIN (decl)))
@@ -1602,8 +1589,7 @@ decl_ultimate_origin (decl)
    served as the original seed for the given block.  */
 
 static tree
-block_ultimate_origin (block)
-     tree block;
+block_ultimate_origin (tree block)
 {
   tree immediate_origin = BLOCK_ABSTRACT_ORIGIN (block);
 
@@ -1631,8 +1617,7 @@ block_ultimate_origin (block)
    parameter.  */
 
 static tree
-decl_class_context (decl)
-     tree decl;
+decl_class_context (tree decl)
 {
   tree context = NULL_TREE;
   if (TREE_CODE (decl) != FUNCTION_DECL || ! DECL_VINDEX (decl))
@@ -1649,8 +1634,7 @@ decl_class_context (decl)
 
 #if 0
 static void
-output_unsigned_leb128 (value)
-     unsigned long value;
+output_unsigned_leb128 (unsigned long value)
 {
   unsigned long orig_value = value;
 
@@ -1668,8 +1652,7 @@ output_unsigned_leb128 (value)
 }
 
 static void
-output_signed_leb128 (value)
-     long value;
+output_signed_leb128 (long value)
 {
   long orig_value = value;
   int negative = (value < 0);
@@ -1724,8 +1707,7 @@ output_signed_leb128 (value)
    draft specification is probably never even useful in practice.  */
 
 static int
-fundamental_type_code (type)
-     tree type;
+fundamental_type_code (tree type)
 {
   if (TREE_CODE (type) == ERROR_MARK)
     return 0;
@@ -1866,9 +1848,7 @@ fundamental_type_code (type)
    qualifiers.  */
 
 static tree
-root_type_1 (type, count)
-     tree type;
-     int count;
+root_type_1 (tree type, int count)
 {
   /* Give up after searching 1000 levels, in case this is a recursive
      pointer type.  Such types are possible in Ada, but it is not possible
@@ -1891,8 +1871,7 @@ root_type_1 (type, count)
 }
 
 static tree
-root_type (type)
-     tree type;
+root_type (tree type)
 {
   type = root_type_1 (type, 0);
   if (type != error_mark_node)
@@ -1904,11 +1883,7 @@ root_type (type)
    of zero or more Dwarf "type-modifier" bytes applicable to the type. */
 
 static void
-write_modifier_bytes_1 (type, decl_const, decl_volatile, count)
-     tree type;
-     int decl_const;
-     int decl_volatile;
-     int count;
+write_modifier_bytes_1 (tree type, int decl_const, int decl_volatile, int count)
 {
   if (TREE_CODE (type) == ERROR_MARK)
     return;
@@ -1942,10 +1917,7 @@ write_modifier_bytes_1 (type, decl_const, decl_volatile, count)
 }
 
 static void
-write_modifier_bytes (type, decl_const, decl_volatile)
-     tree type;
-     int decl_const;
-     int decl_volatile;
+write_modifier_bytes (tree type, int decl_const, int decl_volatile)
 {
   write_modifier_bytes_1 (type, decl_const, decl_volatile, 0);
 }
@@ -1954,8 +1926,7 @@ write_modifier_bytes (type, decl_const, decl_volatile)
    given input type is a Dwarf "fundamental" type.  Otherwise return zero.  */
 
 static inline int
-type_is_fundamental (type)
-     tree type;
+type_is_fundamental (tree type)
 {
   switch (TREE_CODE (type))
     {
@@ -2004,8 +1975,7 @@ type_is_fundamental (type)
    UID number. */
 
 static void
-equate_decl_number_to_die_number (decl)
-     tree decl;
+equate_decl_number_to_die_number (tree decl)
 {
   /* In the case where we are generating a DIE for some ..._DECL node
      which represents either some inline function declaration or some
@@ -2036,8 +2006,7 @@ equate_decl_number_to_die_number (decl)
    UID number. */
 
 static inline void
-equate_type_number_to_die_number (type)
-     tree type;
+equate_type_number_to_die_number (tree type)
 {
   char type_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char die_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2055,16 +2024,14 @@ equate_type_number_to_die_number (type)
 }
 
 static void
-output_reg_number (rtl)
-     rtx rtl;
+output_reg_number (rtx rtl)
 {
   unsigned regno = REGNO (rtl);
 
   if (regno >= DWARF_FRAME_REGISTERS)
     {
-      warning_with_decl (dwarf_last_decl, 
-                        "internal regno botch: `%s' has regno = %d\n",
-                        regno);
+      warning ("%Jinternal regno botch: '%D' has regno = %d\n",
+              dwarf_last_decl, dwarf_last_decl, regno);
       regno = 0;
     }
   dw2_assemble_integer (4, GEN_INT (DBX_REGISTER_NUMBER (regno)));
@@ -2087,17 +2054,14 @@ output_reg_number (rtl)
    RTL tree, turning it into Dwarf postfix code as it goes.  */
 
 static void
-output_mem_loc_descriptor (rtl)
-     rtx rtl;
+output_mem_loc_descriptor (rtx rtl)
 {
   /* Note that for a dynamically sized array, the location we will
      generate a description of here will be the lowest numbered location
      which is actually within the array.  That's *not* necessarily the
      same as the zeroth element of the array.  */
 
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
-  rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+  rtl = (*targetm.delegitimize_address) (rtl);
 
   switch (GET_CODE (rtl))
     {
@@ -2180,8 +2144,7 @@ output_mem_loc_descriptor (rtl)
    generate the (dynamic) address of the object onto the address stack.  */
 
 static void
-output_loc_descriptor (rtl)
-     rtx rtl;
+output_loc_descriptor (rtx rtl)
 {
   switch (GET_CODE (rtl))
     {
@@ -2211,13 +2174,12 @@ output_loc_descriptor (rtl)
 }
 
 /* Given a tree node describing an array bound (either lower or upper)
-   output a representation for that bound.  */
+   output a representation for that bound.  DIM_NUM is used for
+   multi-dimensional arrays and U_OR_L designates upper or lower
+   bound.  */
 
 static void
-output_bound_representation (bound, dim_num, u_or_l)
-     tree bound;
-     unsigned dim_num; /* For multi-dimensional arrays.  */
-     char u_or_l;      /* Designates upper or lower bound.  */
+output_bound_representation (tree bound, unsigned int dim_num, char u_or_l)
 {
   switch (TREE_CODE (bound))
     {
@@ -2280,7 +2242,7 @@ output_bound_representation (bound, dim_num, u_or_l)
                   || TREE_CODE (bound) == CONVERT_EXPR)
              bound = TREE_OPERAND (bound, 0);
 
-           if (TREE_CODE (bound) == SAVE_EXPR 
+           if (TREE_CODE (bound) == SAVE_EXPR
                && SAVE_EXPR_RTL (bound))
              output_loc_descriptor
                (eliminate_regs (SAVE_EXPR_RTL (bound), 0, NULL_RTX));
@@ -2298,8 +2260,7 @@ output_bound_representation (bound, dim_num, u_or_l)
    enumeration_type_die.  */
 
 static void
-output_enumeral_list (link)
-     tree link;
+output_enumeral_list (tree link)
 {
   if (link)
     {
@@ -2318,9 +2279,7 @@ output_enumeral_list (link)
    which is not less than the value itself.  */
 
 static inline HOST_WIDE_INT
-ceiling (value, boundary)
-     HOST_WIDE_INT value;
-     unsigned int boundary;
+ceiling (HOST_WIDE_INT value, unsigned int boundary)
 {
   return (((value + boundary - 1) / boundary) * boundary);
 }
@@ -2330,8 +2289,7 @@ ceiling (value, boundary)
    `integer_type_node' if the given node turns out to be an ERROR_MARK node.  */
 
 static inline tree
-field_type (decl)
-     tree decl;
+field_type (tree decl)
 {
   tree type;
 
@@ -2349,8 +2307,7 @@ field_type (decl)
    BITS_PER_WORD if the node actually turns out to be an ERROR_MARK node.  */
 
 static inline unsigned int
-simple_type_align_in_bits (type)
-     tree type;
+simple_type_align_in_bits (tree type)
 {
   return (TREE_CODE (type) != ERROR_MARK) ? TYPE_ALIGN (type) : BITS_PER_WORD;
 }
@@ -2362,8 +2319,7 @@ simple_type_align_in_bits (type)
    to be an ERROR_MARK node.  */
 
 static inline unsigned HOST_WIDE_INT
-simple_type_size_in_bits (type)
-     tree type;
+simple_type_size_in_bits (tree type)
 {
   tree type_size_tree;
 
@@ -2386,8 +2342,7 @@ simple_type_size_in_bits (type)
    (We can't handle the latter case just yet.)  */
 
 static HOST_WIDE_INT
-field_byte_offset (decl)
-     tree decl;
+field_byte_offset (tree decl)
 {
   unsigned int type_align_in_bytes;
   unsigned int type_align_in_bits;
@@ -2532,7 +2487,7 @@ field_byte_offset (decl)
 /* Generate an AT_sibling attribute.  */
 
 static inline void
-sibling_attribute ()
+sibling_attribute (void)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -2546,8 +2501,7 @@ sibling_attribute ()
    are generated by the routine `data_member_location_attribute' below.  */
 
 static void
-location_attribute (rtl)
-     rtx rtl;
+location_attribute (rtx rtl)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2609,8 +2563,7 @@ location_attribute (rtl)
    (See the `bit_offset_attribute' function below.)  */
 
 static void
-data_member_location_attribute (t)
-     tree t;
+data_member_location_attribute (tree t)
 {
   unsigned object_offset_in_bytes;
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2639,8 +2592,7 @@ data_member_location_attribute (t)
    declared constants do not necessarily get memory "homes".  */
 
 static void
-const_value_attribute (rtl)
-     rtx rtl;
+const_value_attribute (rtx rtl)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2724,8 +2676,7 @@ const_value_attribute (rtl)
    call evaluates to a compile-time constant address.  */
 
 static void
-location_or_const_value_attribute (decl)
-     tree decl;
+location_or_const_value_attribute (tree decl)
 {
   rtx rtl;
 
@@ -2884,8 +2835,7 @@ location_or_const_value_attribute (decl)
    the value of the attribute. */
 
 static inline void
-name_attribute (name_string)
-     const char *name_string;
+name_attribute (const char *name_string)
 {
   if (name_string && *name_string)
     {
@@ -2895,18 +2845,14 @@ name_attribute (name_string)
 }
 
 static inline void
-fund_type_attribute (ft_code)
-     unsigned ft_code;
+fund_type_attribute (unsigned int ft_code)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_fund_type);
   ASM_OUTPUT_DWARF_FUND_TYPE (asm_out_file, ft_code);
 }
 
 static void
-mod_fund_type_attribute (type, decl_const, decl_volatile)
-     tree type;
-     int decl_const;
-     int decl_volatile;
+mod_fund_type_attribute (tree type, int decl_const, int decl_volatile)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2923,8 +2869,7 @@ mod_fund_type_attribute (type, decl_const, decl_volatile)
 }
 
 static inline void
-user_def_type_attribute (type)
-     tree type;
+user_def_type_attribute (tree type)
 {
   char ud_type_name[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -2934,10 +2879,7 @@ user_def_type_attribute (type)
 }
 
 static void
-mod_u_d_type_attribute (type, decl_const, decl_volatile)
-     tree type;
-     int decl_const;
-     int decl_volatile;
+mod_u_d_type_attribute (tree type, int decl_const, int decl_volatile)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2956,8 +2898,7 @@ mod_u_d_type_attribute (type, decl_const, decl_volatile)
 
 #ifdef USE_ORDERING_ATTRIBUTE
 static inline void
-ordering_attribute (ordering)
-     unsigned ordering;
+ordering_attribute (unsigned ordering)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_ordering);
   ASM_OUTPUT_DWARF_DATA2 (asm_out_file, ordering);
@@ -2968,8 +2909,7 @@ ordering_attribute (ordering)
    includes information about the element type of type given array type.  */
 
 static void
-subscript_data_attribute (type)
-     tree type;
+subscript_data_attribute (tree type)
 {
   unsigned dimension_number;
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3067,8 +3007,7 @@ subscript_data_attribute (type)
 }
 
 static void
-byte_size_attribute (tree_node)
-     tree tree_node;
+byte_size_attribute (tree tree_node)
 {
   unsigned size;
 
@@ -3127,8 +3066,7 @@ byte_size_attribute (tree_node)
    bit-field.  (See `byte_size_attribute' above.) */
 
 static inline void
-bit_offset_attribute (decl)
-     tree decl;
+bit_offset_attribute (tree decl)
 {
   HOST_WIDE_INT object_offset_in_bytes = field_byte_offset (decl);
   tree type = DECL_BIT_FIELD_TYPE (decl);
@@ -3180,8 +3118,7 @@ bit_offset_attribute (decl)
    which specifies the length in bits of the given field.  */
 
 static inline void
-bit_size_attribute (decl)
-    tree decl;
+bit_size_attribute (tree decl)
 {
   /* Must be a field and a bit field.  */
   if (TREE_CODE (decl) != FIELD_DECL
@@ -3202,8 +3139,7 @@ bit_size_attribute (decl)
    type.  */
 
 static inline void
-element_list_attribute (element)
-     tree element;
+element_list_attribute (tree element)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3228,8 +3164,7 @@ element_list_attribute (element)
    DIEs with a TAG_compile_unit tag.  */
 
 static inline void
-stmt_list_attribute (label)
-    const char *label;
+stmt_list_attribute (const char *label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_stmt_list);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3240,8 +3175,7 @@ stmt_list_attribute (label)
    for a subroutine DIE.  */
 
 static inline void
-low_pc_attribute (asm_low_label)
-     const char *asm_low_label;
+low_pc_attribute (const char *asm_low_label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_low_pc);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_low_label);
@@ -3251,8 +3185,7 @@ low_pc_attribute (asm_low_label)
    subroutine DIE.  */
 
 static inline void
-high_pc_attribute (asm_high_label)
-     const char *asm_high_label;
+high_pc_attribute (const char *asm_high_label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_high_pc);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_high_label);
@@ -3261,8 +3194,7 @@ high_pc_attribute (asm_high_label)
 /* Generate an AT_body_begin attribute for a subroutine DIE.  */
 
 static inline void
-body_begin_attribute (asm_begin_label)
-     const char *asm_begin_label;
+body_begin_attribute (const char *asm_begin_label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_begin);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_begin_label);
@@ -3271,8 +3203,7 @@ body_begin_attribute (asm_begin_label)
 /* Generate an AT_body_end attribute for a subroutine DIE.  */
 
 static inline void
-body_end_attribute (asm_end_label)
-     const char *asm_end_label;
+body_end_attribute (const char *asm_end_label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_end);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_end_label);
@@ -3282,16 +3213,14 @@ body_end_attribute (asm_end_label)
    are used only within TAG_compile_unit DIEs.  */
 
 static inline void
-language_attribute (language_code)
-     unsigned language_code;
+language_attribute (unsigned int language_code)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_language);
   ASM_OUTPUT_DWARF_DATA4 (asm_out_file, language_code);
 }
 
 static inline void
-member_attribute (context)
-     tree context;
+member_attribute (tree context)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3314,8 +3243,7 @@ member_attribute (context)
 #endif
 
 static inline void
-string_length_attribute (upper_bound)
-     tree upper_bound;
+string_length_attribute (tree upper_bound)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3331,16 +3259,14 @@ string_length_attribute (upper_bound)
 #endif
 
 static inline void
-comp_dir_attribute (dirname)
-     const char *dirname;
+comp_dir_attribute (const char *dirname)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_comp_dir);
   ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname);
 }
 
 static inline void
-sf_names_attribute (sf_names_start_label)
-     const char *sf_names_start_label;
+sf_names_attribute (const char *sf_names_start_label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_sf_names);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3348,8 +3274,7 @@ sf_names_attribute (sf_names_start_label)
 }
 
 static inline void
-src_info_attribute (src_info_start_label)
-     const char *src_info_start_label;
+src_info_attribute (const char *src_info_start_label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_info);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3357,8 +3282,7 @@ src_info_attribute (src_info_start_label)
 }
 
 static inline void
-mac_info_attribute (mac_info_start_label)
-     const char *mac_info_start_label;
+mac_info_attribute (const char *mac_info_start_label)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_mac_info);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3366,8 +3290,7 @@ mac_info_attribute (mac_info_start_label)
 }
 
 static inline void
-prototyped_attribute (func_type)
-     tree func_type;
+prototyped_attribute (tree func_type)
 {
   if ((strcmp (lang_hooks.name, "GNU C") == 0)
       && (TYPE_ARG_TYPES (func_type) != NULL))
@@ -3378,16 +3301,14 @@ prototyped_attribute (func_type)
 }
 
 static inline void
-producer_attribute (producer)
-     const char *producer;
+producer_attribute (const char *producer)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_producer);
   ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, producer);
 }
 
 static inline void
-inline_attribute (decl)
-     tree decl;
+inline_attribute (tree decl)
 {
   if (DECL_INLINE (decl))
     {
@@ -3397,8 +3318,7 @@ inline_attribute (decl)
 }
 
 static inline void
-containing_type_attribute (containing_type)
-     tree containing_type;
+containing_type_attribute (tree containing_type)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3408,8 +3328,7 @@ containing_type_attribute (containing_type)
 }
 
 static inline void
-abstract_origin_attribute (origin)
-     tree origin;
+abstract_origin_attribute (tree origin)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3433,9 +3352,7 @@ abstract_origin_attribute (origin)
 
 #ifdef DWARF_DECL_COORDINATES
 static inline void
-src_coords_attribute (src_fileno, src_lineno)
-     unsigned src_fileno;
-     unsigned src_lineno;
+src_coords_attribute (unsigned src_fileno, unsigned src_lineno)
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_coords);
   ASM_OUTPUT_DWARF_DATA2 (asm_out_file, src_fileno);
@@ -3444,8 +3361,7 @@ src_coords_attribute (src_fileno, src_lineno)
 #endif /* defined(DWARF_DECL_COORDINATES) */
 
 static inline void
-pure_or_virtual_attribute (func_decl)
-     tree func_decl;
+pure_or_virtual_attribute (tree func_decl)
 {
   if (DECL_VIRTUAL_P (func_decl))
     {
@@ -3467,8 +3383,7 @@ pure_or_virtual_attribute (func_decl)
    given decl, but only if it actually has a name.  */
 
 static void
-name_and_src_coords_attributes (decl)
-    tree decl;
+name_and_src_coords_attributes (tree decl)
 {
   tree decl_name = DECL_NAME (decl);
 
@@ -3503,10 +3418,7 @@ name_and_src_coords_attributes (decl)
    routine writes out these "type descriptor" parts.  */
 
 static void
-type_attribute (type, decl_const, decl_volatile)
-     tree type;
-     int decl_const;
-     int decl_volatile;
+type_attribute (tree type, int decl_const, int decl_volatile)
 {
   enum tree_code code = TREE_CODE (type);
   int root_type_modified;
@@ -3561,8 +3473,7 @@ type_attribute (type, decl_const, decl_volatile)
    type was declared without a tag.  */
 
 static const char *
-type_tag (type)
-     tree type;
+type_tag (tree type)
 {
   const char *name = 0;
 
@@ -3590,7 +3501,7 @@ type_tag (type)
 }
 
 static inline void
-dienum_push ()
+dienum_push (void)
 {
   /* Start by checking if the pending_sibling_stack needs to be expanded.
      If necessary, expand it.  */
@@ -3599,8 +3510,8 @@ dienum_push ()
     {
       pending_siblings_allocated += PENDING_SIBLINGS_INCREMENT;
       pending_sibling_stack
-       = (unsigned *) xrealloc (pending_sibling_stack,
-                                pending_siblings_allocated * sizeof(unsigned));
+       = xrealloc (pending_sibling_stack,
+                   pending_siblings_allocated * sizeof(unsigned));
     }
 
   pending_siblings++;
@@ -3611,14 +3522,13 @@ dienum_push ()
    NEXT_DIE_NUM.  */
 
 static inline void
-dienum_pop ()
+dienum_pop (void)
 {
   pending_siblings--;
 }
 
 static inline tree
-member_declared_type (member)
-     tree member;
+member_declared_type (tree member)
 {
   return (DECL_BIT_FIELD_TYPE (member))
           ? DECL_BIT_FIELD_TYPE (member)
@@ -3630,8 +3540,7 @@ member_declared_type (member)
    in the source file.  */
 
 static const char *
-function_start_label (decl)
-    tree decl;
+function_start_label (tree decl)
 {
   rtx x;
   const char *fnname;
@@ -3654,8 +3563,7 @@ function_start_label (decl)
 /* Note that every type of DIE (except a null DIE) gets a sibling.  */
 
 static void
-output_array_type_die (arg)
-     void *arg;
+output_array_type_die (void *arg)
 {
   tree type = arg;
 
@@ -3681,8 +3589,7 @@ output_array_type_die (arg)
 }
 
 static void
-output_set_type_die (arg)
-     void *arg;
+output_set_type_die (void *arg)
 {
   tree type = arg;
 
@@ -3697,8 +3604,7 @@ output_set_type_die (arg)
 /* Implement this when there is a GNU FORTRAN or GNU Ada front end.  */
 
 static void
-output_entry_point_die (arg)
-     void *arg;
+output_entry_point_die (void *arg)
 {
   tree decl = arg;
   tree origin = decl_ultimate_origin (decl);
@@ -3724,8 +3630,7 @@ output_entry_point_die (arg)
 /* Output a DIE to represent an inlined instance of an enumeration type.  */
 
 static void
-output_inlined_enumeration_type_die (arg)
-     void *arg;
+output_inlined_enumeration_type_die (void *arg)
 {
   tree type = arg;
 
@@ -3739,8 +3644,7 @@ output_inlined_enumeration_type_die (arg)
 /* Output a DIE to represent an inlined instance of a structure type.  */
 
 static void
-output_inlined_structure_type_die (arg)
-     void *arg;
+output_inlined_structure_type_die (void *arg)
 {
   tree type = arg;
 
@@ -3754,8 +3658,7 @@ output_inlined_structure_type_die (arg)
 /* Output a DIE to represent an inlined instance of a union type.  */
 
 static void
-output_inlined_union_type_die (arg)
-     void *arg;
+output_inlined_union_type_die (void *arg)
 {
   tree type = arg;
 
@@ -3771,8 +3674,7 @@ output_inlined_union_type_die (arg)
    This information is encoded into the element_list attribute.         */
 
 static void
-output_enumeration_type_die (arg)
-     void *arg;
+output_enumeration_type_die (void *arg)
 {
   tree type = arg;
 
@@ -3807,8 +3709,7 @@ output_enumeration_type_die (arg)
    formal argument type of some subprogram type.  */
 
 static void
-output_formal_parameter_die (arg)
-     void *arg;
+output_formal_parameter_die (void *arg)
 {
   tree node = arg;
 
@@ -3849,8 +3750,7 @@ output_formal_parameter_die (arg)
    or block-local) which has "external linkage" (according to ANSI-C).  */
 
 static void
-output_global_subroutine_die (arg)
-     void *arg;
+output_global_subroutine_die (void *arg)
 {
   tree decl = arg;
   tree origin = decl_ultimate_origin (decl);
@@ -3899,8 +3799,7 @@ output_global_subroutine_die (arg)
    or block-local) which has "external linkage" (according to ANSI-C).  */
 
 static void
-output_global_variable_die (arg)
-     void *arg;
+output_global_variable_die (void *arg)
 {
   tree decl = arg;
   tree origin = decl_ultimate_origin (decl);
@@ -3927,8 +3826,7 @@ output_global_variable_die (arg)
 }
 
 static void
-output_label_die (arg)
-     void *arg;
+output_label_die (void *arg)
 {
   tree decl = arg;
   tree origin = decl_ultimate_origin (decl);
@@ -3946,7 +3844,7 @@ output_label_die (arg)
       rtx insn = DECL_RTL (decl);
 
       /* Deleted labels are programmer specified labels which have been
-        eliminated because of various optimisations.  We still emit them
+        eliminated because of various optimizations.  We still emit them
         here so that it is possible to put breakpoints on them.  */
       if (GET_CODE (insn) == CODE_LABEL
          || ((GET_CODE (insn) == NOTE
@@ -3970,8 +3868,7 @@ output_label_die (arg)
 }
 
 static void
-output_lexical_block_die (arg)
-     void *arg;
+output_lexical_block_die (void *arg)
 {
   tree stmt = arg;
 
@@ -3991,8 +3888,7 @@ output_lexical_block_die (arg)
 }
 
 static void
-output_inlined_subroutine_die (arg)
-     void *arg;
+output_inlined_subroutine_die (void *arg)
 {
   tree stmt = arg;
 
@@ -4016,8 +3912,7 @@ output_inlined_subroutine_die (arg)
    or block-local) which has "internal linkage" (according to ANSI-C).  */
 
 static void
-output_local_variable_die (arg)
-     void *arg;
+output_local_variable_die (void *arg)
 {
   tree decl = arg;
   tree origin = decl_ultimate_origin (decl);
@@ -4040,8 +3935,7 @@ output_local_variable_die (arg)
 }
 
 static void
-output_member_die (arg)
-     void *arg;
+output_member_die (void *arg)
 {
   tree decl = arg;
 
@@ -4069,8 +3963,7 @@ output_member_die (arg)
    someday.  */
 
 static void
-output_pointer_type_die (arg)
-     void *arg;
+output_pointer_type_die (void *arg)
 {
   tree type = arg;
 
@@ -4082,8 +3975,7 @@ output_pointer_type_die (arg)
 }
 
 static void
-output_reference_type_die (arg)
-     void *arg;
+output_reference_type_die (void *arg)
 {
   tree type = arg;
 
@@ -4096,8 +3988,7 @@ output_reference_type_die (arg)
 #endif
 
 static void
-output_ptr_to_mbr_type_die (arg)
-     void *arg;
+output_ptr_to_mbr_type_die (void *arg)
 {
   tree type = arg;
 
@@ -4110,8 +4001,7 @@ output_ptr_to_mbr_type_die (arg)
 }
 
 static void
-output_compile_unit_die (arg)
-     void *arg;
+output_compile_unit_die (void *arg)
 {
   const char *main_input_filename = arg;
   const char *language_string = lang_hooks.name;
@@ -4146,7 +4036,7 @@ output_compile_unit_die (arg)
     stmt_list_attribute (LINE_BEGIN_LABEL);
 
   {
-    const char *wd = getpwd ();
+    const char *wd = get_src_pwd ();
     if (wd)
       comp_dir_attribute (wd);
   }
@@ -4161,8 +4051,7 @@ output_compile_unit_die (arg)
 }
 
 static void
-output_string_type_die (arg)
-     void *arg;
+output_string_type_die (void *arg)
 {
   tree type = arg;
 
@@ -4170,15 +4059,15 @@ output_string_type_die (arg)
   sibling_attribute ();
   equate_type_number_to_die_number (type);
   member_attribute (TYPE_CONTEXT (type));
-  /* this is a fixed length string */
+  /* This is a fixed length string.  */
   byte_size_attribute (type);
 }
 
 static void
-output_inheritance_die (arg)
-     void *arg;
+output_inheritance_die (void *arg)
 {
-  tree binfo = arg;
+  tree binfo = ((tree *)arg)[0];
+  tree access = ((tree *)arg)[1];
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_inheritance);
   sibling_attribute ();
@@ -4189,12 +4078,12 @@ output_inheritance_die (arg)
       ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_virtual);
       ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
     }
-  if (TREE_VIA_PUBLIC (binfo))
+  if (access == access_public_node)
     {
       ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_public);
       ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
     }
-  else if (TREE_VIA_PROTECTED (binfo))
+  else if (access == access_protected_node)
     {
       ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_protected);
       ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
@@ -4202,8 +4091,7 @@ output_inheritance_die (arg)
 }
 
 static void
-output_structure_type_die (arg)
-     void *arg;
+output_structure_type_die (void *arg)
 {
   tree type = arg;
 
@@ -4230,8 +4118,7 @@ output_structure_type_die (arg)
    or block-local) which has "internal linkage" (according to ANSI-C).  */
 
 static void
-output_local_subroutine_die (arg)
-     void *arg;
+output_local_subroutine_die (void *arg)
 {
   tree decl = arg;
   tree origin = decl_ultimate_origin (decl);
@@ -4278,8 +4165,7 @@ output_local_subroutine_die (arg)
 }
 
 static void
-output_subroutine_type_die (arg)
-     void *arg;
+output_subroutine_type_die (void *arg)
 {
   tree type = arg;
   tree return_type = TREE_TYPE (type);
@@ -4294,8 +4180,7 @@ output_subroutine_type_die (arg)
 }
 
 static void
-output_typedef_die (arg)
-     void *arg;
+output_typedef_die (void *arg)
 {
   tree decl = arg;
   tree origin = decl_ultimate_origin (decl);
@@ -4316,8 +4201,7 @@ output_typedef_die (arg)
 }
 
 static void
-output_union_type_die (arg)
-     void *arg;
+output_union_type_die (void *arg)
 {
   tree type = arg;
 
@@ -4344,8 +4228,7 @@ output_union_type_die (arg)
    at the end of an (ANSI prototyped) formal parameters list.  */
 
 static void
-output_unspecified_parameters_die (arg)
-     void *arg;
+output_unspecified_parameters_die (void *arg)
 {
   tree decl_or_type = arg;
 
@@ -4370,8 +4253,7 @@ output_unspecified_parameters_die (arg)
 }
 
 static void
-output_padded_null_die (arg)
-     void *arg ATTRIBUTE_UNUSED;
+output_padded_null_die (void *arg ATTRIBUTE_UNUSED)
 {
   ASM_OUTPUT_ALIGN (asm_out_file, 2);  /* 2**2 == 4 */
 }
@@ -4385,9 +4267,7 @@ output_padded_null_die (arg)
    of the DIE, there must always be a terminator label for the DIE.  */
 
 static void
-output_die (die_specific_output_function, param)
-     void (*die_specific_output_function) PARAMS ((void *));
-     void *param;
+output_die (void (*die_specific_output_function) (void *), void *param)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -4417,7 +4297,7 @@ output_die (die_specific_output_function, param)
 }
 
 static void
-end_sibling_chain ()
+end_sibling_chain (void)
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -4449,8 +4329,7 @@ end_sibling_chain ()
    the formal parameter list.  */
 
 static void
-output_formal_types (function_or_method_type)
-     tree function_or_method_type;
+output_formal_types (tree function_or_method_type)
 {
   tree link;
   tree formal_type = NULL;
@@ -4514,15 +4393,14 @@ output_formal_types (function_or_method_type)
 /* Remember a type in the pending_types_list.  */
 
 static void
-pend_type (type)
-     tree type;
+pend_type (tree type)
 {
   if (pending_types == pending_types_allocated)
     {
       pending_types_allocated += PENDING_TYPES_INCREMENT;
       pending_types_list
-       = (tree *) xrealloc (pending_types_list,
-                            sizeof (tree) * pending_types_allocated);
+       = xrealloc (pending_types_list,
+                   sizeof (tree) * pending_types_allocated);
     }
   pending_types_list[pending_types++] = type;
 
@@ -4570,9 +4448,7 @@ pend_type (type)
    true scope of the types we temporarily pended.  */
 
 static inline int
-type_ok_for_scope (type, scope)
-    tree type;
-    tree scope;
+type_ok_for_scope (tree type, tree scope)
 {
   /* Tagged types (i.e. struct, union, and enum types) must always be
      output only in the scopes where they actually belong (or else the
@@ -4607,8 +4483,7 @@ type_ok_for_scope (type, scope)
    of them too.  */
 
 static void
-output_pending_types_for_scope (containing_scope)
-     tree containing_scope;
+output_pending_types_for_scope (tree containing_scope)
 {
   unsigned i;
 
@@ -4645,15 +4520,14 @@ output_pending_types_for_scope (containing_scope)
 /* Remember a type in the incomplete_types_list.  */
 
 static void
-add_incomplete_type (type)
-     tree type;
+add_incomplete_type (tree type)
 {
   if (incomplete_types == incomplete_types_allocated)
     {
       incomplete_types_allocated += INCOMPLETE_TYPES_INCREMENT;
       incomplete_types_list
-       = (tree *) xrealloc (incomplete_types_list,
-                            sizeof (tree) * incomplete_types_allocated);
+       = xrealloc (incomplete_types_list,
+                   sizeof (tree) * incomplete_types_allocated);
     }
 
   incomplete_types_list[incomplete_types++] = type;
@@ -4663,7 +4537,7 @@ add_incomplete_type (type)
    emit full debugging info for them.  */
 
 static void
-retry_incomplete_types ()
+retry_incomplete_types (void)
 {
   tree type;
 
@@ -4677,9 +4551,7 @@ retry_incomplete_types ()
 }
 
 static void
-output_type (type, containing_scope)
-     tree type;
-     tree containing_scope;
+output_type (tree type, tree containing_scope)
 {
   if (type == 0 || type == error_mark_node)
     return;
@@ -4895,18 +4767,25 @@ output_type (type, containing_scope)
 
        if (COMPLETE_TYPE_P (type))
          {
+           tree binfo = TYPE_BINFO (type);
+
            /* First output info about the base classes.  */
-           if (TYPE_BINFO (type) && TYPE_BINFO_BASETYPES (type))
+           if (binfo)
              {
-               register tree bases = TYPE_BINFO_BASETYPES (type);
-               register int n_bases = TREE_VEC_LENGTH (bases);
+               tree bases = BINFO_BASETYPES (binfo);
+               tree accesses = BINFO_BASEACCESSES (binfo);
+               register int n_bases = BINFO_N_BASETYPES (binfo);
                register int i;
 
                for (i = 0; i < n_bases; i++)
                  {
-                   tree binfo = TREE_VEC_ELT (bases, i);
+                   tree arg[2];
+
+                   arg[0] = TREE_VEC_ELT (bases, i);
+                   arg[1] = (accesses ? TREE_VEC_ELT (accesses, i)
+                             : access_public_node);
                    output_type (BINFO_TYPE (binfo), containing_scope);
-                   output_die (output_inheritance_die, binfo);
+                   output_die (output_inheritance_die, arg);
                  }
              }
 
@@ -4972,8 +4851,7 @@ output_type (type, containing_scope)
 }
 
 static void
-output_tagged_type_instantiation (type)
-     tree type;
+output_tagged_type_instantiation (tree type)
 {
   if (type == 0 || type == error_mark_node)
     return;
@@ -5016,9 +4894,7 @@ output_tagged_type_instantiation (type)
    the things which are local to the given block.  */
 
 static void
-output_block (stmt, depth)
-    tree stmt;
-    int depth;
+output_block (tree stmt, int depth)
 {
   int must_output_die = 0;
   tree origin;
@@ -5110,9 +4986,7 @@ output_block (stmt, depth)
    a `binding contour') and (recursively) all of it's sub-blocks.  */
 
 static void
-output_decls_for_scope (stmt, depth)
-     tree stmt;
-     int depth;
+output_decls_for_scope (tree stmt, int depth)
 {
   /* Ignore blocks never really used to make RTL.  */
 
@@ -5148,8 +5022,7 @@ output_decls_for_scope (stmt, depth)
 /* Is this a typedef we can avoid emitting?  */
 
 static inline int
-is_redundant_typedef (decl)
-     tree decl;
+is_redundant_typedef (tree decl)
 {
   if (TYPE_DECL_IS_STUB (decl))
     return 1;
@@ -5166,9 +5039,7 @@ is_redundant_typedef (decl)
 /* Output Dwarf .debug information for a decl described by DECL.  */
 
 static void
-output_decl (decl, containing_scope)
-     tree decl;
-     tree containing_scope;
+output_decl (tree decl, tree containing_scope)
 {
   /* Make a note of the decl node we are going to be working on.  We may
      need to give the user the source coordinates of where it appeared in
@@ -5273,7 +5144,7 @@ output_decl (decl, containing_scope)
        output_formal_types (TREE_TYPE (decl));
       else
        {
-         /* Generate DIEs to represent all known formal parameters */
+         /* Generate DIEs to represent all known formal parameters */
 
          tree arg_decls = DECL_ARGUMENTS (decl);
          tree parm;
@@ -5348,13 +5219,13 @@ output_decl (decl, containing_scope)
 
            if (fn_arg_types)
              {
-             /* this is the prototyped case, check for ...  */
+             /* This is the prototyped case, check for....  */
              if (TREE_VALUE (tree_last (fn_arg_types)) != void_type_node)
                output_die (output_unspecified_parameters_die, decl);
              }
            else
              {
-               /* this is unprototyped, check for undefined (just declaration) */
+               /* This is unprototyped, check for undefined (just declaration).  */
                if (!DECL_INITIAL (decl))
                  output_die (output_unspecified_parameters_die, decl);
              }
@@ -5491,7 +5362,7 @@ output_decl (decl, containing_scope)
         function.  */
 
       {
-       void (*func) PARAMS ((void *));
+       void (*func) (void *);
        register tree origin = decl_ultimate_origin (decl);
 
        if (origin != NULL && TREE_CODE (origin) == PARM_DECL)
@@ -5537,8 +5408,7 @@ output_decl (decl, containing_scope)
 \f
 /* Output debug information for a function.  */
 static void
-dwarfout_function_decl (decl)
-     tree decl;
+dwarfout_function_decl (tree decl)
 {
   dwarfout_file_scope_decl (decl, 0);
 }
@@ -5546,8 +5416,7 @@ dwarfout_function_decl (decl)
 /* Debug information for a global DECL.  Called from toplev.c after
    compilation proper has finished.  */
 static void
-dwarfout_global_decl (decl)
-     tree decl;
+dwarfout_global_decl (tree decl)
 {
   /* Output DWARF information for file-scope tentative data object
      declarations, file-scope (extern) function declarations (which
@@ -5562,8 +5431,7 @@ dwarfout_global_decl (decl)
    being output at this point.  (We're putting that off until we need
    to do it.)  */
 static void
-dwarfout_deferred_inline_function (decl)
-     tree decl;
+dwarfout_deferred_inline_function (tree decl)
 {
   /* Generate the DWARF info for the "abstract" instance of a function
      which we may later generate inlined and/or out-of-line instances
@@ -5591,9 +5459,7 @@ dwarfout_deferred_inline_function (decl)
 }
 
 static void
-dwarfout_file_scope_decl (decl, set_finalizing)
-     tree decl;
-     int set_finalizing;
+dwarfout_file_scope_decl (tree decl, int set_finalizing)
 {
   if (TREE_CODE (decl) == ERROR_MARK)
     return;
@@ -5731,7 +5597,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
         normal built-in types for the language we are compiling, except
         in cases where the types in question are *not* DWARF fundamental
         types.  We make an exception in the case of non-fundamental types
-        for the sake of objective C (and perhaps C++) because the GNU
+        for the sake of Objective-C (and perhaps C++) because the GNU
         front-ends for these languages may in fact create certain "built-in"
         types which are (for example) RECORD_TYPEs.  In such cases, we
         really need to output these (non-fundamental) types because other
@@ -5804,9 +5670,8 @@ dwarfout_file_scope_decl (decl, set_finalizing)
    for a lexical block.         */
 
 static void
-dwarfout_begin_block (line, blocknum)
-     unsigned int line ATTRIBUTE_UNUSED;
-     unsigned int blocknum;
+dwarfout_begin_block (unsigned int line ATTRIBUTE_UNUSED,
+                     unsigned int blocknum)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -5819,9 +5684,7 @@ dwarfout_begin_block (line, blocknum)
    for a lexical block.         */
 
 static void
-dwarfout_end_block (line, blocknum)
-     unsigned int line ATTRIBUTE_UNUSED;
-     unsigned int blocknum;
+dwarfout_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int blocknum)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -5835,9 +5698,8 @@ dwarfout_end_block (line, blocknum)
    to their home locations).  */
 
 static void
-dwarfout_end_prologue (line, file)
-     unsigned int line ATTRIBUTE_UNUSED;
-     const char *file ATTRIBUTE_UNUSED;
+dwarfout_end_prologue (unsigned int line ATTRIBUTE_UNUSED,
+                      const char *file ATTRIBUTE_UNUSED)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -5853,8 +5715,7 @@ dwarfout_end_prologue (line, file)
    the real body of the function ends (just before the epilogue code).  */
 
 static void
-dwarfout_end_function (line)
-     unsigned int line ATTRIBUTE_UNUSED;
+dwarfout_end_function (unsigned int line ATTRIBUTE_UNUSED)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -5870,9 +5731,8 @@ dwarfout_end_function (line)
    has been generated. */
 
 static void
-dwarfout_end_epilogue (line, file)
-     unsigned int line ATTRIBUTE_UNUSED;
-     const char *file ATTRIBUTE_UNUSED;
+dwarfout_end_epilogue (unsigned int line ATTRIBUTE_UNUSED,
+                      const char *file ATTRIBUTE_UNUSED)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -5884,8 +5744,7 @@ dwarfout_end_epilogue (line, file)
 }
 
 static void
-shuffle_filename_entry (new_zeroth)
-     filename_entry *new_zeroth;
+shuffle_filename_entry (filename_entry *new_zeroth)
 {
   filename_entry temp_entry;
   filename_entry *limit_p;
@@ -5910,7 +5769,7 @@ shuffle_filename_entry (new_zeroth)
 /* Create a new (string) entry for the .debug_sfnames section.  */
 
 static void
-generate_new_sfname_entry ()
+generate_new_sfname_entry (void)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -5957,8 +5816,7 @@ generate_new_sfname_entry ()
    before them.) */
 
 static unsigned
-lookup_filename (file_name)
-     const char *file_name;
+lookup_filename (const char *file_name)
 {
   filename_entry *search_p;
   filename_entry *limit_p = &filename_table[ft_entries];
@@ -5986,8 +5844,7 @@ lookup_filename (file_name)
     {
       ft_entries_allocated += FT_ENTRIES_INCREMENT;
       filename_table
-       = (filename_entry *)
-         xrealloc (filename_table,
+       = xrealloc (filename_table,
                    ft_entries_allocated * sizeof (filename_entry));
     }
 
@@ -6008,9 +5865,7 @@ lookup_filename (file_name)
 }
 
 static void
-generate_srcinfo_entry (line_entry_num, files_entry_num)
-     unsigned line_entry_num;
-     unsigned files_entry_num;
+generate_srcinfo_entry (unsigned int line_entry_num, unsigned int files_entry_num)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -6024,9 +5879,7 @@ generate_srcinfo_entry (line_entry_num, files_entry_num)
 }
 
 static void
-dwarfout_source_line (line, filename)
-     unsigned int line;
-     const char *filename;
+dwarfout_source_line (unsigned int line, const char *filename)
 {
   if (debug_info_level >= DINFO_LEVEL_NORMAL
       /* We can't emit line number info for functions in separate sections,
@@ -6079,10 +5932,7 @@ dwarfout_source_line (line, filename)
 /* Generate an entry in the .debug_macinfo section.  */
 
 static void
-generate_macinfo_entry (type, offset, string)
-     unsigned int type;
-     rtx offset;
-     const char *string;
+generate_macinfo_entry (unsigned int type, rtx offset, const char *string)
 {
   if (! use_gnu_debug_info_extensions)
     return;
@@ -6097,18 +5947,15 @@ generate_macinfo_entry (type, offset, string)
 
 /* Wrapper for toplev.c callback to check debug info level.  */
 static void
-dwarfout_start_source_file_check (line, filename)
-     unsigned int line;
-     const char *filename;
+dwarfout_start_source_file_check (unsigned int line, const char *filename)
 {
   if (debug_info_level == DINFO_LEVEL_VERBOSE)
     dwarfout_start_source_file (line, filename);
 }
 
 static void
-dwarfout_start_source_file (line, filename)
-     unsigned int line ATTRIBUTE_UNUSED;
-     const char *filename;
+dwarfout_start_source_file (unsigned int line ATTRIBUTE_UNUSED,
+                           const char *filename)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
   const char *label1, *label2;
@@ -6125,16 +5972,14 @@ dwarfout_start_source_file (line, filename)
 
 /* Wrapper for toplev.c callback to check debug info level.  */
 static void
-dwarfout_end_source_file_check (lineno)
-     unsigned lineno;
+dwarfout_end_source_file_check (unsigned int lineno)
 {
   if (debug_info_level == DINFO_LEVEL_VERBOSE)
     dwarfout_end_source_file (lineno);
 }
 
 static void
-dwarfout_end_source_file (lineno)
-     unsigned lineno;
+dwarfout_end_source_file (unsigned int lineno)
 {
   generate_macinfo_entry (MACINFO_resume, GEN_INT (lineno), "");
 }
@@ -6145,9 +5990,7 @@ dwarfout_end_source_file (lineno)
    whitespace part.  */
 
 static void
-dwarfout_define (lineno, buffer)
-     unsigned lineno;
-     const char *buffer;
+dwarfout_define (unsigned int lineno, const char *buffer)
 {
   static int initialized = 0;
 
@@ -6165,9 +6008,7 @@ dwarfout_define (lineno, buffer)
    whitespace part.  */
 
 static void
-dwarfout_undef (lineno, buffer)
-     unsigned lineno;
-     const char *buffer;
+dwarfout_undef (unsigned int lineno, const char *buffer)
 {
   generate_macinfo_entry (MACINFO_undef, GEN_INT (lineno), buffer);
 }
@@ -6175,8 +6016,7 @@ dwarfout_undef (lineno, buffer)
 /* Set up for Dwarf output at the start of compilation.         */
 
 static void
-dwarfout_init (main_input_filename)
-     const char *main_input_filename;
+dwarfout_init (const char *main_input_filename)
 {
   warning ("support for the DWARF1 debugging format is deprecated");
 
@@ -6187,23 +6027,19 @@ dwarfout_init (main_input_filename)
   /* Allocate the initial hunk of the pending_sibling_stack.  */
 
   pending_sibling_stack
-    = (unsigned *)
-       xmalloc (PENDING_SIBLINGS_INCREMENT * sizeof (unsigned));
+    = xmalloc (PENDING_SIBLINGS_INCREMENT * sizeof (unsigned));
   pending_siblings_allocated = PENDING_SIBLINGS_INCREMENT;
   pending_siblings = 1;
 
   /* Allocate the initial hunk of the filename_table.  */
 
-  filename_table
-    = (filename_entry *)
-       xmalloc (FT_ENTRIES_INCREMENT * sizeof (filename_entry));
+  filename_table = xmalloc (FT_ENTRIES_INCREMENT * sizeof (filename_entry));
   ft_entries_allocated = FT_ENTRIES_INCREMENT;
   ft_entries = 0;
 
   /* Allocate the initial hunk of the pending_types_list.  */
 
-  pending_types_list
-    = (tree *) xmalloc (PENDING_TYPES_INCREMENT * sizeof (tree));
+  pending_types_list = xmalloc (PENDING_TYPES_INCREMENT * sizeof (tree));
   pending_types_allocated = PENDING_TYPES_INCREMENT;
   pending_types = 0;
 
@@ -6271,11 +6107,11 @@ dwarfout_init (main_input_filename)
          ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION);
          ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL);
          {
-           const char *pwd = getpwd ();
+           const char *pwd = get_src_pwd ();
            char *dirname;
 
            if (!pwd)
-             fatal_io_error ("can't get current directory");
+             fatal_error ("can't get current directory: %m");
 
            dirname = concat (pwd, "/", NULL);
            ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname);
@@ -6357,7 +6193,7 @@ dwarfout_init (main_input_filename)
   fputc ('\n', asm_out_file);
   ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION);
   ASM_OUTPUT_LABEL (asm_out_file, DEBUG_BEGIN_LABEL);
-  output_die (output_compile_unit_die, (PTR) main_input_filename);
+  output_die (output_compile_unit_die, (void *) main_input_filename);
   ASM_OUTPUT_POP_SECTION (asm_out_file);
 
   fputc ('\n', asm_out_file);
@@ -6366,8 +6202,7 @@ dwarfout_init (main_input_filename)
 /* Output stuff that dwarf requires at the end of every file.  */
 
 static void
-dwarfout_finish (main_input_filename)
-     const char *main_input_filename ATTRIBUTE_UNUSED;
+dwarfout_finish (const char *main_input_filename ATTRIBUTE_UNUSED)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];