c-typeck.c (digest_init): Call 'convert_for_assignment' before returning.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 16 Jul 2005 14:34:37 +0000 (14:34 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 16 Jul 2005 14:34:37 +0000 (14:34 +0000)
* c-typeck.c (digest_init): Call 'convert_for_assignment'
before returning.

From-SVN: r102090

gcc/ChangeLog
gcc/c-typeck.c

index de6bad93aff0181c8cfe6596486d0e574332aa8d..8b57b807621c0be70f7c1fb477171f6971080ee1 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * c-typeck.c (digest_init): Call 'convert_for_assignment'
+       before returning.
+
 2005-07-16  Jan Hubicka  <jh@suse.cz>
 
        * cfg.c (update_bb_profile_for_threading): Fix profile updating.
index ab72ceea1200875985bfd9285fd82b6ad9dc67f4..907a4fcba07a766065b0deef7668a75842633961 100644 (file)
@@ -4442,6 +4442,10 @@ digest_init (tree type, tree init, bool strict_string, int require_constant)
          inside_init = error_mark_node;
        }
 
+      /* Added to enable additional -Wmissing-format-attribute warnings.  */
+      if (TREE_CODE (TREE_TYPE (inside_init)) == POINTER_TYPE)
+       inside_init = convert_for_assignment (type, inside_init, ic_init, NULL_TREE,
+                                             NULL_TREE, 0);
       return inside_init;
     }