aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/init/brace2.C
blob: fec9c6ce4d7ae0e87c7870caa08d1a382f94b442 (plain)
1
2
3
4
5
6
7
8
// { dg-do compile }
// [dcl.init] paragraph 13.
int x = { 2 };
const char * y = { "hello" };
int a = 2;
int b = { 2,3 }; // { dg-error "requires one element in initializer" }
int c = { { 2 } } ; // { dg-error "braces around scalar initializer" }
int d = {}; // { dg-error "initializer" "" { target c++98 } }