OSDN Git Service

1999-11-25 Mark Mitchell <mark@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / cp / typeck.c
index 4bf8178..0bfb99c 100644 (file)
@@ -3017,7 +3017,8 @@ build_function_call_real (function, params, require_complete, flags)
 
   if (TREE_CODE (function) == ADDR_EXPR
       && TREE_CODE (TREE_OPERAND (function, 0)) == FUNCTION_DECL
-      && DECL_BUILT_IN (TREE_OPERAND (function, 0)))
+      && DECL_BUILT_IN (TREE_OPERAND (function, 0))
+      && DECL_BUILT_IN_CLASS (TREE_OPERAND (function, 0)) == BUILT_IN_NORMAL)
     switch (DECL_FUNCTION_CODE (TREE_OPERAND (function, 0)))
       {
       case BUILT_IN_ABS:
@@ -4789,7 +4790,7 @@ build_unary_op (code, xarg, noconvert)
       return fold (build1 (code, argtype, arg));
     }
 
-  error (errstring);
+  error ("%s", errstring);
   return error_mark_node;
 }
 
@@ -4978,10 +4979,6 @@ mark_addressable (exp)
            && DECL_RTL (x) != 0
            && ! DECL_IN_MEMORY_P (x))
          {
-           /* We thought this would make a good constant variable,
-              but we were wrong.  */
-           push_permanent_obstack ();
-
            TREE_ASM_WRITTEN (x) = 0;
            DECL_RTL (x) = 0;
            rest_of_decl_compilation (x, 0, 
@@ -4989,8 +4986,6 @@ mark_addressable (exp)
                                      0);
            TREE_ADDRESSABLE (x) = 1;
 
-           pop_obstacks ();
-
            return 1;
          }
        /* Caller should not be trying to mark initialized
@@ -6395,7 +6390,10 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
   if (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node)
     return error_mark_node;
 
-  /* Issue warnings about peculiar, but legal, uses of NULL.  */
+  /* Issue warnings about peculiar, but legal, uses of NULL.  We
+     do this *before* the call to decl_constant_value so as to
+     avoid duplicate warnings on code like `const int I = NULL;
+     f(I);'.  */
   if (ARITHMETIC_TYPE_P (type) && rhs == null_node)
     cp_warning ("converting NULL to non-pointer type");
 
@@ -6572,21 +6570,6 @@ convert_for_initialization (exp, type, rhs, flags, errtype, fndecl, parmnum)
   if (IS_AGGR_TYPE (type))
     return ocp_convert (type, rhs, CONV_IMPLICIT|CONV_FORCE_TEMP, flags);
 
-  if (type == TREE_TYPE (rhs))
-    {
-      /* Issue warnings about peculiar, but legal, uses of NULL.  We
-        do this *before* the call to decl_constant_value so as to
-        avoid duplicate warnings on code like `const int I = NULL;
-        f(I);'.  */
-      if (ARITHMETIC_TYPE_P (type) && rhs == null_node)
-       cp_warning ("converting NULL to non-pointer type");
-
-      if (TREE_READONLY_DECL_P (rhs))
-       rhs = decl_constant_value (rhs);
-
-      return rhs;
-    }
-
   return convert_for_assignment (type, rhs, errtype, fndecl, parmnum);
 }
 \f