OSDN Git Service

2007-07-09 Geoffrey Keating <geoffk@apple.com>
[pf3gnuchains/gcc-fork.git] / gcc / convert.c
index b6c6d0f..0c7c108 100644 (file)
@@ -413,12 +413,12 @@ convert_to_integer (tree type, tree expr)
            fn = mathfn_built_in (s_intype, BUILT_IN_LLROUND);
          break;
 
-       CASE_FLT_FN (BUILT_IN_RINT):
-         /* Only convert rint* if we can ignore math exceptions.  */
+       CASE_FLT_FN (BUILT_IN_NEARBYINT):
+         /* Only convert nearbyint* if we can ignore math exceptions.  */
          if (flag_trapping_math)
            break;
          /* ... Fall through ...  */
-       CASE_FLT_FN (BUILT_IN_NEARBYINT):
+       CASE_FLT_FN (BUILT_IN_RINT):
          if (outprec < TYPE_PRECISION (long_integer_type_node)
              || (outprec == TYPE_PRECISION (long_integer_type_node)
                  && !TYPE_UNSIGNED (type)))
@@ -656,9 +656,9 @@ convert_to_integer (tree type, tree expr)
                             || !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg1)))
                            && (ex_form == PLUS_EXPR
                                || ex_form == MINUS_EXPR)))
-                     typex = lang_hooks.types.unsigned_type (typex);
+                     typex = unsigned_type_for (typex);
                    else
-                     typex = lang_hooks.types.signed_type (typex);
+                     typex = signed_type_for (typex);
                    return convert (type,
                                    fold_build2 (ex_form, typex,
                                                 convert (typex, arg0),
@@ -678,9 +678,9 @@ convert_to_integer (tree type, tree expr)
            /* Don't do unsigned arithmetic where signed was wanted,
               or vice versa.  */
            if (TYPE_UNSIGNED (TREE_TYPE (expr)))
-             typex = lang_hooks.types.unsigned_type (type);
+             typex = unsigned_type_for (type);
            else
-             typex = lang_hooks.types.signed_type (type);
+             typex = signed_type_for (type);
            return convert (type,
                            fold_build1 (ex_form, typex,
                                         convert (typex,