]> gcc.gnu.org Git - gcc.git/commitdiff
decl.c (start_preparsed_function): Do not promote return type.
authorRichard Guenther <rguenther@suse.de>
Mon, 9 Jul 2007 09:53:11 +0000 (09:53 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 9 Jul 2007 09:53:11 +0000 (09:53 +0000)
2007-07-09  Richard Guenther  <rguenther@suse.de>

cp/
* decl.c (start_preparsed_function): Do not promote return type.

* c-decl.c (start_function): Do not promote return type.

From-SVN: r126480

gcc/ChangeLog
gcc/c-decl.c
gcc/cp/ChangeLog
gcc/cp/decl.c

index 16d0b220baefff525c8bbf1d0f73be54351cd031..a98964b9dc100e877f5911790360443aa7043412 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-09  Richard Guenther  <rguenther@suse.de>
+
+       * c-decl.c (start_function): Do not promote return type.
+
 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
 
        * function.c (do_warn_unused_parameter): Do not warn if
index bde95aa025219b764cb59474ac8c80e379097475..012339eec621b61b643e40c8285f1dece02da8f0 100644 (file)
@@ -6270,18 +6270,6 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
   declare_parm_level ();
 
   restype = TREE_TYPE (TREE_TYPE (current_function_decl));
-  /* Promote the value to int before returning it.  */
-  if (c_promoting_integer_type_p (restype))
-    {
-      /* It retains unsignedness if not really getting wider.  */
-      if (TYPE_UNSIGNED (restype)
-         && (TYPE_PRECISION (restype)
-                 == TYPE_PRECISION (integer_type_node)))
-       restype = unsigned_type_node;
-      else
-       restype = integer_type_node;
-    }
-
   resdecl = build_decl (RESULT_DECL, NULL_TREE, restype);
   DECL_ARTIFICIAL (resdecl) = 1;
   DECL_IGNORED_P (resdecl) = 1;
index 24a47637203f047655d27e88dc299b9f24b11801..60ae1778f8cf26dd639f5151fe67181b000a7628 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-09  Richard Guenther  <rguenther@suse.de>
+
+       * decl.c (start_preparsed_function): Do not promote return type.
+
 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/30535
index bed426bb9c4b210d514442d38500065a98fa10db..b49bfc845a96bf99afdc31e15b267a9b9ffd09fe 100644 (file)
@@ -10872,9 +10872,6 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
 
   /* Build the return declaration for the function.  */
   restype = TREE_TYPE (fntype);
-  /* Promote the value to int before returning it.  */
-  if (c_promoting_integer_type_p (restype))
-    restype = type_promotes_to (restype);
   if (DECL_RESULT (decl1) == NULL_TREE)
     {
       tree resdecl;
This page took 0.131782 seconds and 5 git commands to generate.