OSDN Git Service

cp/:
[pf3gnuchains/gcc-fork.git] / gcc / cp / class.c
index 20ceb65..12192e6 100644 (file)
@@ -295,7 +295,7 @@ build_base_path (enum tree_code code,
 
   /* Don't bother with the calculations inside sizeof; they'll ICE if the
      source type is incomplete and the pointer value doesn't matter.  */
-  if (skip_evaluation)
+  if (cp_unevaluated_operand != 0)
     {
       expr = build_nop (build_pointer_type (target_type), expr);
       if (!want_pointer)
@@ -626,7 +626,7 @@ build_vtbl_ref_1 (tree instance, tree idx)
     vtbl = build_vfield_ref (instance, basetype);
 
 
-  aref = build_array_ref (vtbl, idx, input_location);
+  aref = build_array_ref (input_location, vtbl, idx);
   TREE_CONSTANT (aref) |= TREE_CONSTANT (vtbl) && TREE_CONSTANT (idx);
 
   return aref;
@@ -774,7 +774,7 @@ get_vtable_decl (tree type, int complete)
   if (complete)
     {
       DECL_EXTERNAL (decl) = 1;
-      finish_decl (decl, NULL_TREE, NULL_TREE, NULL_TREE);
+      cp_finish_decl (decl, NULL_TREE, false, NULL_TREE, 0);
     }
 
   return decl;
@@ -3636,7 +3636,8 @@ build_base_field (record_layout_info rli, tree binfo,
       CLASSTYPE_EMPTY_P (t) = 0;
 
       /* Create the FIELD_DECL.  */
-      decl = build_decl (FIELD_DECL, NULL_TREE, CLASSTYPE_AS_BASE (basetype));
+      decl = build_decl (input_location,
+                        FIELD_DECL, NULL_TREE, CLASSTYPE_AS_BASE (basetype));
       DECL_ARTIFICIAL (decl) = 1;
       DECL_IGNORED_P (decl) = 1;
       DECL_FIELD_CONTEXT (decl) = t;
@@ -4428,7 +4429,8 @@ create_vtable_ptr (tree t, tree* virtuals_p)
         stores cannot alias stores to void*!  */
       tree field;
 
-      field = build_decl (FIELD_DECL, get_vfield_name (t), vtbl_ptr_type_node);
+      field = build_decl (input_location, 
+                         FIELD_DECL, get_vfield_name (t), vtbl_ptr_type_node);
       DECL_VIRTUAL_P (field) = 1;
       DECL_ARTIFICIAL (field) = 1;
       DECL_FIELD_CONTEXT (field) = t;
@@ -5008,7 +5010,8 @@ layout_class_type (tree t, tree *virtuals_p)
        {
          tree padding_field;
 
-         padding_field = build_decl (FIELD_DECL,
+         padding_field = build_decl (input_location,
+                                     FIELD_DECL,
                                      NULL_TREE,
                                      char_type_node);
          DECL_BIT_FIELD (padding_field) = 1;
@@ -5096,7 +5099,8 @@ layout_class_type (tree t, tree *virtuals_p)
       for (field = TYPE_FIELDS (t); field; field = TREE_CHAIN (field))
        if (TREE_CODE (field) == FIELD_DECL)
          {
-           *next_field = build_decl (FIELD_DECL,
+           *next_field = build_decl (input_location,
+                                     FIELD_DECL,
                                      DECL_NAME (field),
                                      TREE_TYPE (field));
            DECL_CONTEXT (*next_field) = base_t;
@@ -5137,7 +5141,8 @@ layout_class_type (tree t, tree *virtuals_p)
   /* Make sure not to create any structures with zero size.  */
   if (integer_zerop (rli_size_unit_so_far (rli)) && CLASSTYPE_EMPTY_P (t))
     place_field (rli,
-                build_decl (FIELD_DECL, NULL_TREE, char_type_node));
+                build_decl (input_location,
+                            FIELD_DECL, NULL_TREE, char_type_node));
 
   /* Let the back end lay out the type.  */
   finish_record_layout (rli, /*free_p=*/true);
@@ -6180,7 +6185,7 @@ resolve_address_of_overloaded_function (tree target_type,
 
       fn = TREE_PURPOSE (matches);
       for (match = TREE_CHAIN (matches); match; match = TREE_CHAIN (match))
-       if (!decls_match (fn, TREE_PURPOSE (matches)))
+       if (!decls_match (fn, TREE_PURPOSE (match)))
          break;
 
       if (match)