From: Jason Merrill Date: Fri, 27 May 2011 19:32:22 +0000 (-0400) Subject: re PR c++/49176 ([c++0x] valid code rejected with "error: uninitialized const") X-Git-Tag: releases/gcc-4.7.0~6418 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69cf9a1cfe034650e76a31ea6d98b92da0acf188;p=thirdparty%2Fgcc.git re PR c++/49176 ([c++0x] valid code rejected with "error: uninitialized const") PR c++/49176 * g++.dg/template/const5.C: New. From-SVN: r174356 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 319fc28e0598..a9e31ce77fc1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2011-05-27 Jason Merrill + PR c++/49176 + * g++.dg/template/const5.C: New. + * g++.dg/cpp0x/enum18.C: New. * g++.dg/cpp0x/lambda/lambda-nested4.C: New. diff --git a/gcc/testsuite/g++.dg/template/const5.C b/gcc/testsuite/g++.dg/template/const5.C new file mode 100644 index 000000000000..5d3ec5b1c910 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/const5.C @@ -0,0 +1,12 @@ +// PR c++/49176 +// { dg-options -std=c++0x } + +struct A { static int a(); }; + +template +struct B { static int const b; }; + +int f() { return B<0>::b; } + +template +int const B::b=A::a();