------- Comment #1 from jakub at gcc dot gnu dot org  2009-02-02 11:18 -------
I think this depends on whether we want as an exception allow this or not.

If not, e.g.:
--- typeck2.c.jj22009-01-13 18:32:14.000000000 +0100
+++ typeck2.c2009-02-02 12:15:58.000000000 +0100
@@ -789,7 +789,8 @@ digest_init_r (tree type, tree init, boo
     }

   /* Handle scalar types (including conversions) and references.  */
-  if (TREE_CODE (type) != COMPLEX_TYPE
+  if ((TREE_CODE (type) != COMPLEX_TYPE
+       || BRACE_ENCLOSED_INITIALIZER_P (init))
       && (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE))
     {
       tree *exp;

gets rid of the ICE, instead it will reject it with:
pr39056.C:1: error: cannot convert '<brace-enclosed initializer list>' to 'int
__complex__' in initialization


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39056

Reply via email to