From: No Author Date: Sun, 27 Feb 2005 18:10:41 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.4.4~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a36431c37ba6bba430c7599a29285b0fc960ffd;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_4-branch'. From-SVN: r95625 --- diff --git a/gcc/testsuite/g++.dg/parse/constant7.C b/gcc/testsuite/g++.dg/parse/constant7.C new file mode 100644 index 000000000000..c54ad55c1f05 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/constant7.C @@ -0,0 +1,9 @@ +// PR c++/19991 + +enum { e = 1 }; + +template struct A +{ + static const int i = e; + char a[i]; +}; diff --git a/gcc/testsuite/g++.dg/template/error17.C b/gcc/testsuite/g++.dg/template/error17.C new file mode 100644 index 000000000000..24b364455fda --- /dev/null +++ b/gcc/testsuite/g++.dg/template/error17.C @@ -0,0 +1,8 @@ +// PR c++/20153 + +template +void +foo() +{ + union { struct { }; }; // { dg-error "" } +} diff --git a/gcc/testsuite/g++.dg/warn/Wbraces2.C b/gcc/testsuite/g++.dg/warn/Wbraces2.C new file mode 100644 index 000000000000..b51d5ca77b92 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wbraces2.C @@ -0,0 +1,15 @@ +// PR c++/20175 +// { dg-options "-Wmissing-braces" } +int a[2][2] = { 0, 1, 2, 3 }; // { dg-warning "missing braces" } +int b[2][2] = { { 0, 1 }, { 2, 3 } }; +int c[2][2] = { { { 0 }, 1 }, { 2, 3 } }; // { dg-error "brace-enclosed" } +struct S { char s[6]; int i; }; +S d = { "hello", 1 }; +S e = { { "hello" }, 1 }; +S f = { { { "hello" } }, 1 }; // { dg-error "brace-enclosed" } +S g = { 'h', 'e', 'l', 'l', 'o', '\0', 1 }; // { dg-warning "missing braces" } +struct T { wchar_t s[6]; int i; }; +T i = { L"hello", 1 }; +T j = { { L"hello" }, 1 }; +T k = { { { L"hello" } }, 1 }; // { dg-error "brace-enclosed" } +T l = { L'h', L'e', L'l', L'l', L'o', L'\0', 1 };// { dg-warning "missing braces" }