===================================================================
@@ -5511,9 +5511,15 @@ reshape_init_r (tree type, reshape_iter *d, bool f
{
if (SCALAR_TYPE_P (type))
{
- if (complain & tf_error)
- error ("braces around scalar initializer for type %qT", type);
- init = error_mark_node;
+ if (cxx_dialect < cxx11
+ /* Isn't value-initialization. */
+ || CONSTRUCTOR_NELTS (init) > 0)
+ {
+ if (complain & tf_error)
+ error ("braces around scalar initializer for type %qT",
+ type);
+ init = error_mark_node;
+ }
}
else
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
===================================================================
@@ -0,0 +1,4 @@
+// PR c++/60859
+// { dg-do compile { target c++11 } }
+
+int a[] = { {} };