]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable and bitfield to tinfo...
authorMark Mitchell <mark@codesourcery.com>
Wed, 24 May 2000 06:15:04 +0000 (06:15 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 24 May 2000 06:15:04 +0000 (06:15 +0000)
* cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
and bitfield to tinfo_fn_p.
(DECL_TINFO_FN_P): Adjust.
(SET_DECL_TINFO_FN_P): Likewise.
(DECL_MUTABLE_P): Likewise.
(DECL_C_BIT_FIELD): Likewise.
(SET_DECL_C_BIT_FIELD): Likewise.
(CLEAR_DECL_C_BIT_FIELD): Likewise.
(DECL_UNINLINABLE): Likewise.
* class.c (alter_access): Call retrofit_lang_decl if ncessary.
(handle_using_decl): Remove assertion.
(build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
to build FIELD_DECLs.
(build_base_field): Likewise.
(layout_class_type): Likewise.
* decl.c (init_decl_processing): Likewise.
(build_ptrmemfunc_type): Likewise.
(grokdeclarator): Likewise.
* decl2.c (grok_x_components): Likewise.
* except.c (call_eh_info): Likewise.
* init.c (init_init_processing): Likewise.
* rtti.c (expand_class_desc): Likewise.
(create_pseudo_type_info): Likewise.
(get_vmi_pseudo_type_info): Likewise.
(create_tinfo_types): Likewise.
* ptree.c (print_lang_decl): Adjust.
* typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
before checking DECL_MUTABLE_P.

From-SVN: r34125

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/except.c
gcc/cp/init.c
gcc/cp/ptree.c
gcc/cp/rtti.c
gcc/cp/typeck.c

index d9ebe0369e29ff5754b210da9edb66c3d51b39db..97b525dc4e84a2299f62519043cd8f91620399ad 100644 (file)
@@ -1,5 +1,34 @@
 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
 
+       * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
+       and bitfield to tinfo_fn_p.
+       (DECL_TINFO_FN_P): Adjust.
+       (SET_DECL_TINFO_FN_P): Likewise.
+       (DECL_MUTABLE_P): Likewise.
+       (DECL_C_BIT_FIELD): Likewise.
+       (SET_DECL_C_BIT_FIELD): Likewise.
+       (CLEAR_DECL_C_BIT_FIELD): Likewise.
+       (DECL_UNINLINABLE): Likewise.
+       * class.c (alter_access): Call retrofit_lang_decl if ncessary.
+       (handle_using_decl): Remove assertion.
+       (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
+       to build FIELD_DECLs.
+       (build_base_field): Likewise.
+       (layout_class_type): Likewise.
+       * decl.c (init_decl_processing): Likewise.
+       (build_ptrmemfunc_type): Likewise.
+       (grokdeclarator): Likewise.
+       * decl2.c (grok_x_components): Likewise.
+       * except.c (call_eh_info): Likewise.
+       * init.c (init_init_processing): Likewise.
+       * rtti.c (expand_class_desc): Likewise.
+       (create_pseudo_type_info): Likewise.
+       (get_vmi_pseudo_type_info): Likewise.
+       (create_tinfo_types): Likewise.
+       * ptree.c (print_lang_decl): Adjust.
+       * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
+       before checking DECL_MUTABLE_P.
+       
        * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
        parameters for template functions.
        * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
index e83c916fe102042cfc82854f97053baa3db828fe..b86bac460c0688448718ded39a72cee9aefc69e7 100644 (file)
@@ -1435,7 +1435,12 @@ alter_access (t, fdecl, access)
      tree fdecl;
      tree access;
 {
-  tree elem = purpose_member (t, DECL_ACCESS (fdecl));
+  tree elem;
+
+  if (!DECL_LANG_SPECIFIC (fdecl))
+    retrofit_lang_decl (fdecl);
+
+  elem = purpose_member (t, DECL_ACCESS (fdecl));
   if (elem)
     {
       if (TREE_VALUE (elem) != access)
@@ -1516,8 +1521,6 @@ handle_using_decl (using_decl, t)
 
   if (is_overloaded_fn (fdecl))
     flist = fdecl;
-  else if (! DECL_LANG_SPECIFIC (fdecl))
-    my_friendly_abort (20000221);
 
   if (! old_value)
     ;
@@ -3540,7 +3543,7 @@ build_vtbl_or_vbase_field (name, assembler_name, type, class_type, fcontext,
   *empty_p = 0;
 
   /* Build the FIELD_DECL.  */
-  field = build_lang_decl (FIELD_DECL, name, type);
+  field = build_decl (FIELD_DECL, name, type);
   DECL_ASSEMBLER_NAME (field) = assembler_name;
   DECL_VIRTUAL_P (field) = 1;
   DECL_ARTIFICIAL (field) = 1;
@@ -3760,7 +3763,7 @@ build_base_field (rli, binfo, empty_p, base_align, v)
        location information.  */
     return;
   
-  decl = build_lang_decl (FIELD_DECL, NULL_TREE, basetype);
+  decl = build_decl (FIELD_DECL, NULL_TREE, basetype);
   DECL_ARTIFICIAL (decl) = 1;
   DECL_FIELD_CONTEXT (decl) = rli->t;
   DECL_SIZE (decl) = CLASSTYPE_SIZE (basetype);
@@ -4755,7 +4758,7 @@ layout_class_type (t, empty_p, vfuns_p,
     {
       tree padding;
 
-      padding = build_lang_decl (FIELD_DECL, NULL_TREE, char_type_node);
+      padding = build_decl (FIELD_DECL, NULL_TREE, char_type_node);
       place_field (rli, padding);
       TYPE_NONCOPIED_PARTS (t) 
        = tree_cons (NULL_TREE, padding, TYPE_NONCOPIED_PARTS (t));
index 1cc9740a3f7f789101370eafca159f518db19563..d58a5a50fabbf9bd9872b73aa986504333c95e25 100644 (file)
@@ -90,8 +90,10 @@ Boston, MA 02111-1307, USA.  */
    0: DECL_ERROR_REPORTED (in VAR_DECL).
       DECL_TEMPLATE_PARM_P (in CONST_DECL, TYPE_DECL, or TEMPLATE_DECL)
       DECL_LOCAL_FUNCTION_P (in FUNCTION_DECL)
+      DECL_MUTABLE_P (in FIELD_DECL)
    1: C_TYPEDEF_EXPLICITLY_SIGNED (in TYPE_DECL).
       DECL_TEMPLATE_INSTANTIATED (in a VAR_DECL or a FUNCTION_DECL)
+      DECL_C_BITFIELD (in FIELD_DECL)
    2: DECL_THIS_EXTERN (in VAR_DECL or FUNCTION_DECL).
       DECL_IMPLICIT_TYPEDEF_P (in a TYPE_DECL)
    3: DECL_IN_AGGR_P.
@@ -1829,20 +1831,20 @@ struct lang_decl_flags
   unsigned static_function : 1;
   unsigned pure_virtual : 1;
   unsigned has_in_charge_parm_p : 1;
-  unsigned bitfield : 1;
+  unsigned uninlinable : 1;
 
-  unsigned mutable_flag : 1;
   unsigned deferred : 1;
   unsigned use_template : 2;
   unsigned nonconverting : 1;
   unsigned declared_inline : 1;
   unsigned not_really_extern : 1;
   unsigned needs_final_overrider : 1;
-
   unsigned defined_in_class : 1;
+
   unsigned pending_inline_p : 1;
   unsigned global_ctor_p : 1;
   unsigned global_dtor_p : 1;
+  unsigned tinfo_fn_p : 1;
   unsigned dummy : 4;
 
   tree context;
@@ -1989,11 +1991,11 @@ struct lang_decl
 #define DECL_TINFO_FN_P(NODE)                                  \
   (TREE_CODE (NODE) == FUNCTION_DECL                           \
    && DECL_ARTIFICIAL (NODE)                                   \
-   && DECL_LANG_SPECIFIC(NODE)->decl_flags.mutable_flag)
+   && DECL_LANG_SPECIFIC(NODE)->decl_flags.tinfo_fn_p)
 
 /* Mark NODE as a type-info function.  */
 #define SET_DECL_TINFO_FN_P(NODE) \
-  (DECL_LANG_SPECIFIC((NODE))->decl_flags.mutable_flag = 1)
+  (DECL_LANG_SPECIFIC((NODE))->decl_flags.tinfo_fn_p = 1)
 
 /* Nonzero if NODE is an overloaded `operator delete[]' function.  */
 #define DECL_ARRAY_DELETE_OPERATOR_P(NODE) \
@@ -2055,7 +2057,7 @@ struct lang_decl
 
 /* Nonzero for _DECL means that this member object type
    is mutable.  */
-#define DECL_MUTABLE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.mutable_flag)
+#define DECL_MUTABLE_P(NODE) (DECL_LANG_FLAG_0 (NODE))
 
 /* Nonzero for _DECL means that this constructor is a non-converting
    constructor.  */
@@ -2427,16 +2429,15 @@ extern int flag_new_for_scope;
 
 /* In a FIELD_DECL, nonzero if the decl was originally a bitfield.  */
 #define DECL_C_BIT_FIELD(NODE) \
-  (DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))\
-   && DECL_LANG_SPECIFIC (NODE)->decl_flags.bitfield)
+  (DECL_LANG_FLAG_1 (FIELD_DECL_CHECK (NODE)) == 1)
 #define SET_DECL_C_BIT_FIELD(NODE) \
-  (DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))->decl_flags.bitfield = 1)
+  (DECL_LANG_FLAG_1 (FIELD_DECL_CHECK (NODE)) = 1)
 #define CLEAR_DECL_C_BIT_FIELD(NODE) \
-  (DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))->decl_flags.bitfield = 0)
+  (DECL_LANG_FLAG_1 (FIELD_DECL_CHECK (NODE)) = 0)
 
 /* In a FUNCTION_DECL, nonzero if the function cannot be inlined.  */
 #define DECL_UNINLINABLE(NODE) \
-  (DECL_LANG_SPECIFIC (NODE)->decl_flags.bitfield)
+  (DECL_LANG_SPECIFIC (NODE)->decl_flags.uninlinable)
 
 #define INTEGRAL_CODE_P(CODE) \
   (CODE == INTEGER_TYPE || CODE == ENUMERAL_TYPE || CODE == BOOLEAN_TYPE)
index 2fd0fe109e0e6ff4c23d6e7aee22bc36a82e6a27..41cdb8cfed5c83b01d03a2166cb5b855e139b29d 100644 (file)
@@ -6384,12 +6384,12 @@ init_decl_processing ()
   else
     {
       vtable_entry_type = make_aggr_type (RECORD_TYPE);
-      fields[0] = build_lang_decl (FIELD_DECL, delta_identifier,
-                                  delta_type_node);
-      fields[1] = build_lang_decl (FIELD_DECL, index_identifier,
-                                  delta_type_node);
-      fields[2] = build_lang_decl (FIELD_DECL, pfn_identifier,
-                                  ptr_type_node);
+      fields[0] = build_decl (FIELD_DECL, delta_identifier,
+                             delta_type_node);
+      fields[1] = build_decl (FIELD_DECL, index_identifier,
+                             delta_type_node);
+      fields[2] = build_decl (FIELD_DECL, pfn_identifier,
+                             ptr_type_node);
       finish_builtin_type (vtable_entry_type, VTBL_PTR_TYPE, fields, 2,
                           double_type_node);
 
@@ -9031,24 +9031,24 @@ build_ptrmemfunc_type (type)
     {
       u = make_aggr_type (UNION_TYPE);
       SET_IS_AGGR_TYPE (u, 0);
-      fields[0] = build_lang_decl (FIELD_DECL, pfn_identifier, type);
-      fields[1] = build_lang_decl (FIELD_DECL, delta2_identifier,
-                                  delta_type_node);
+      fields[0] = build_decl (FIELD_DECL, pfn_identifier, type);
+      fields[1] = build_decl (FIELD_DECL, delta2_identifier,
+                             delta_type_node);
       finish_builtin_type (u, "__ptrmemfunc_type", fields, 1, ptr_type_node);
       TYPE_NAME (u) = NULL_TREE;
 
-      fields[0] = build_lang_decl (FIELD_DECL, delta_identifier,
-                                  delta_type_node);
-      fields[1] = build_lang_decl (FIELD_DECL, index_identifier,
-                                  delta_type_node);
-      fields[2] = build_lang_decl (FIELD_DECL, pfn_or_delta2_identifier, u);
+      fields[0] = build_decl (FIELD_DECL, delta_identifier,
+                             delta_type_node);
+      fields[1] = build_decl (FIELD_DECL, index_identifier,
+                             delta_type_node);
+      fields[2] = build_decl (FIELD_DECL, pfn_or_delta2_identifier, u);
       finish_builtin_type (t, "__ptrmemfunc_type", fields, 2, ptr_type_node);
     }
   else
     {
-      fields[0] = build_lang_decl (FIELD_DECL, pfn_identifier, type);
-      fields[1] = build_lang_decl (FIELD_DECL, delta_identifier,
-                                  delta_type_node);
+      fields[0] = build_decl (FIELD_DECL, pfn_identifier, type);
+      fields[1] = build_decl (FIELD_DECL, delta_identifier,
+                             delta_type_node);
       finish_builtin_type (t, "__ptrmemfunc_type", fields, 1, ptr_type_node);
     }
 
@@ -11411,7 +11411,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
              }
            else
              {
-               decl = build_lang_decl (FIELD_DECL, declarator, type);
+               decl = build_decl (FIELD_DECL, declarator, type);
                if (RIDBIT_SETP (RID_MUTABLE, specbits))
                  {
                    DECL_MUTABLE_P (decl) = 1;
index c88779ca7add1cdb9375955ebd846bb419df2446..f97397f1cfdca847f2a632297b4baad1457f71e8 100644 (file)
@@ -914,7 +914,7 @@ grok_x_components (specs)
     return;
 
   fixup_anonymous_aggr (t);
-  finish_member_declaration (build_lang_decl (FIELD_DECL, NULL_TREE, t)); 
+  finish_member_declaration (build_decl (FIELD_DECL, NULL_TREE, t)); 
 
   /* Ignore any inline function definitions in the anonymous union
      since an anonymous union may not have function members.  */
index 91f75c257feb53e412bda26bca51fdcf1ceebd3d..ca73686a9c0ba29c5c2271c1f28523771400f2c9 100644 (file)
@@ -210,13 +210,13 @@ call_eh_info ()
       /* struct cp_eh_info.  This must match exception.cc.  Note that this
         type is not pushed anywhere.  */
       t1= make_aggr_type (RECORD_TYPE);
-      fields[0] = build_lang_decl (FIELD_DECL, 
+      fields[0] = build_decl (FIELD_DECL, 
                     get_identifier ("handler_label"), ptr_type_node);
-      fields[1] = build_lang_decl (FIELD_DECL, 
+      fields[1] = build_decl (FIELD_DECL, 
                     get_identifier ("dynamic_handler_chain"), ptr_type_node);
-      fields[2] = build_lang_decl (FIELD_DECL, 
+      fields[2] = build_decl (FIELD_DECL, 
                     get_identifier ("info"), ptr_type_node);
-      fields[3] = build_lang_decl (FIELD_DECL, 
+      fields[3] = build_decl (FIELD_DECL, 
                     get_identifier ("table_index"), ptr_type_node);
       /* N.B.: The fourth field LEN is expected to be
         the number of fields - 1, not the total number of fields.  */
@@ -224,32 +224,32 @@ call_eh_info ()
       t1 = build_pointer_type (t1);
 
       t1= make_aggr_type (RECORD_TYPE);
-      fields[0] = build_lang_decl (FIELD_DECL, 
+      fields[0] = build_decl (FIELD_DECL, 
                     get_identifier ("match_function"), ptr_type_node);
-      fields[1] = build_lang_decl (FIELD_DECL, 
+      fields[1] = build_decl (FIELD_DECL, 
                     get_identifier ("language"), short_integer_type_node);
-      fields[2] = build_lang_decl (FIELD_DECL, 
+      fields[2] = build_decl (FIELD_DECL, 
                     get_identifier ("version"), short_integer_type_node);
       /* N.B.: The fourth field LEN is expected to be
         the number of fields - 1, not the total number of fields.  */
       finish_builtin_type (t1, "__eh_info", fields, 2, ptr_type_node);
       t = make_aggr_type (RECORD_TYPE);
-      fields[0] = build_lang_decl (FIELD_DECL, 
-                                  get_identifier ("eh_info"), t1);
-      fields[1] = build_lang_decl (FIELD_DECL, get_identifier ("value"),
-                                  ptr_type_node);
-      fields[2] = build_lang_decl (FIELD_DECL, get_identifier ("type"),
-                                  ptr_type_node);
-      fields[3] = build_lang_decl
+      fields[0] = build_decl (FIELD_DECL, 
+                             get_identifier ("eh_info"), t1);
+      fields[1] = build_decl (FIELD_DECL, get_identifier ("value"),
+                             ptr_type_node);
+      fields[2] = build_decl (FIELD_DECL, get_identifier ("type"),
+                             ptr_type_node);
+      fields[3] = build_decl
        (FIELD_DECL, get_identifier ("cleanup"),
         build_pointer_type (build_function_type
                             (ptr_type_node, tree_cons
                              (NULL_TREE, ptr_type_node, void_list_node))));
-      fields[4] = build_lang_decl (FIELD_DECL, get_identifier ("caught"),
-                                  boolean_type_node);
-      fields[5] = build_lang_decl (FIELD_DECL, get_identifier ("next"),
-                                  build_pointer_type (t));
-      fields[6] = build_lang_decl
+      fields[4] = build_decl (FIELD_DECL, get_identifier ("caught"),
+                             boolean_type_node);
+      fields[5] = build_decl (FIELD_DECL, get_identifier ("next"),
+                             build_pointer_type (t));
+      fields[6] = build_decl
        (FIELD_DECL, get_identifier ("handlers"), long_integer_type_node);
       /* N.B.: The fourth field LEN is expected to be
         the number of fields - 1, not the total number of fields.  */
index 3dbca4b2677e2c6a453d3f0aa1d3ee15921a636d..aece8ed4da302829ffe7c897e9dafd10e71cbbc7 100644 (file)
@@ -68,7 +68,7 @@ void init_init_processing ()
   /* Define the structure that holds header information for
      arrays allocated via operator new.  */
   BI_header_type = make_aggr_type (RECORD_TYPE);
-  fields[0] = build_lang_decl (FIELD_DECL, nelts_identifier, sizetype);
+  fields[0] = build_decl (FIELD_DECL, nelts_identifier, sizetype);
 
   /* Use the biggest alignment supported by the target to prevent operator
      new from returning misaligned pointers. */
index 7a234a55a35008e037ba1fec0cb62eac1e88c222..d3cd45eceac77bd7908146d9297bbb2a9dcc0003 100644 (file)
@@ -32,16 +32,17 @@ print_lang_decl (file, node, indent)
      tree node;
      int indent;
 {
-  if (!DECL_LANG_SPECIFIC (node))
-    return;
-  /* A FIELD_DECL only has the flags structure, which we aren't displaying
-     anyways.  */
-  if (DECL_MUTABLE_P (node))
+  if (TREE_CODE (node) == FIELD_DECL)
     {
-      indent_to (file, indent + 3);
-      fprintf (file, " mutable ");
+      if (DECL_MUTABLE_P (node))
+       {
+         indent_to (file, indent + 3);
+         fprintf (file, " mutable ");
+       }
+      return;
     }
-  if (TREE_CODE (node) == FIELD_DECL)
+
+  if (!DECL_LANG_SPECIFIC (node))
     return;
   indent_to (file, indent + 3);
   if (TREE_CODE (node) == FUNCTION_DECL
index a7c13b52c4a115f15ebfaa73b38d2f699cfcb0b9..bde623f9eef694d50458c19794989338640ef5b0 100644 (file)
@@ -942,23 +942,23 @@ expand_class_desc (tdecl, type)
       base_desc_type_node = make_aggr_type (RECORD_TYPE);
 
       /* Actually const __user_type_info * */
-      fields [0] = build_lang_decl
+      fields [0] = build_decl
        (FIELD_DECL, NULL_TREE,
         build_pointer_type (build_qualified_type
                             (type_info_type_node,
                              TYPE_QUAL_CONST)));
-      fields [1] = build_lang_decl
+      fields [1] = build_decl
        (FIELD_DECL, NULL_TREE, 
         flag_new_abi ? intSI_type_node : unsigned_intSI_type_node);
       DECL_BIT_FIELD (fields[1]) = 1;
       DECL_SIZE (fields[1]) = bitsize_int (29);
 
-      fields [2] = build_lang_decl (FIELD_DECL, NULL_TREE, boolean_type_node);
+      fields [2] = build_decl (FIELD_DECL, NULL_TREE, boolean_type_node);
       DECL_BIT_FIELD (fields[2]) = 1;
       DECL_SIZE (fields[2]) = bitsize_one_node;
 
       /* Actually enum access */
-      fields [3] = build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node);
+      fields [3] = build_decl (FIELD_DECL, NULL_TREE, integer_type_node);
       DECL_BIT_FIELD (fields[3]) = 1;
       DECL_SIZE (fields[3]) = bitsize_int (2);
 
@@ -1758,7 +1758,7 @@ create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...))
     }
 
   /* First field is the pseudo type_info base class. */
-  fields[0] = build_lang_decl (FIELD_DECL, NULL_TREE, ti_desc_type_node);
+  fields[0] = build_decl (FIELD_DECL, NULL_TREE, ti_desc_type_node);
   
   /* Now add the derived fields.  */
   for (ix = 0; (field_decl = va_arg (ap, tree));)
@@ -1808,9 +1808,9 @@ get_vmi_pseudo_type_info (num_bases)
 
   desc = create_pseudo_type_info
             ("__vmi_class_type_info", num_bases,
-             build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node),
-             build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node),
-             build_lang_decl (FIELD_DECL, NULL_TREE, base_array),
+             build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
+             build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
+             build_decl (FIELD_DECL, NULL_TREE, base_array),
              NULL);
 
   pop_nested_namespace (abi_node);
@@ -1841,8 +1841,8 @@ create_tinfo_types ()
     tree fields[2];
 
     ti_desc_type_node = make_aggr_type (RECORD_TYPE);
-    fields[0] = build_lang_decl (FIELD_DECL, NULL_TREE, const_ptr_type_node);
-    fields[1] = build_lang_decl (FIELD_DECL, NULL_TREE, const_string_type_node);
+    fields[0] = build_decl (FIELD_DECL, NULL_TREE, const_ptr_type_node);
+    fields[1] = build_decl (FIELD_DECL, NULL_TREE, const_string_type_node);
     finish_builtin_type (ti_desc_type_node, "__type_info_pseudo",
                          fields, 1, ptr_type_node);
     TYPE_HAS_CONSTRUCTOR (ti_desc_type_node) = 1;
@@ -1857,8 +1857,8 @@ create_tinfo_types ()
      and pointer to the pointed to type.  */
   ptr_desc_type_node = create_pseudo_type_info
       ("__pointer_type_info", 0,
-       build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node),
-       build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+       build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
+       build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
        NULL);
 
   /* Array, function and enum type_info. No additional fields. */
@@ -1881,7 +1881,7 @@ create_tinfo_types ()
      This is really a descendant of __class_type_info.  */
   si_class_desc_type_node = create_pseudo_type_info
            ("__si_class_type_info", 0,
-            build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+            build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
             NULL);
   
   /* Base class internal helper. Pointer to base type, offset to base,
@@ -1889,8 +1889,8 @@ create_tinfo_types ()
   {
     tree fields[2];
     
-    fields[0] = build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info);
-    fields[1] = build_lang_decl (FIELD_DECL, NULL_TREE, integer_types[itk_long]);
+    fields[0] = build_decl (FIELD_DECL, NULL_TREE, ptr_type_info);
+    fields[1] = build_decl (FIELD_DECL, NULL_TREE, integer_types[itk_long]);
     base_desc_type_node = make_aggr_type (RECORD_TYPE);
     finish_builtin_type (base_desc_type_node, "__base_class_type_info_pseudo",
                          fields, 1, ptr_type_node);
@@ -1905,9 +1905,9 @@ create_tinfo_types ()
      This is really a descendant of __pointer_type_info.  */
   ptmd_desc_type_node = create_pseudo_type_info
        ("__pointer_to_member_type_info", 0,
-        build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node),
-        build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
-        build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+        build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
+        build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+        build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
         NULL);
 
   pop_nested_namespace (abi_node);
index 378fc6be6bd6793bb7c63d2560e74d54eac1b3ef..c0927efbe00a52461601b3cd881ceb0da6c0079b 100644 (file)
@@ -2242,7 +2242,7 @@ build_component_ref (datum, component, basetype_path, protect)
       /* A field is const (volatile) if the enclosing object, or the
         field itself, is const (volatile).  But, a mutable field is
         not const, even within a const object.  */
-      if (DECL_LANG_SPECIFIC (field) && DECL_MUTABLE_P (field))
+      if (DECL_MUTABLE_P (field))
        type_quals &= ~TYPE_QUAL_CONST;
       field_type = cp_build_qualified_type (field_type, type_quals);
     }