From: Paolo Carlini Date: Fri, 29 Aug 2014 15:58:26 +0000 (+0000) Subject: re PR c++/54002 ([C++0x] Initializing constexpr static member using constexpr static... X-Git-Tag: releases/gcc-5.1.0~4950 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f71f9d3fb6156edd82822ad9a26d3e4c6495d041;p=thirdparty%2Fgcc.git re PR c++/54002 ([C++0x] Initializing constexpr static member using constexpr static method fails) 2014-08-29 Paolo Carlini PR c++/54002 * g++.dg/cpp0x/constexpr-54002.C: New. From-SVN: r214734 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3d774a075c14..564b821f7c5e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-08-29 Paolo Carlini + + PR c++/54002 + * g++.dg/cpp0x/constexpr-54002.C: New. + 2014-08-29 Paolo Carlini PR c++/56991 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-54002.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-54002.C new file mode 100644 index 000000000000..125a18d8e9e4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-54002.C @@ -0,0 +1,7 @@ +// PR c++/54002 +// { dg-do compile { target c++11 } } + +class C1 { + constexpr static int foo(int x) { return x + 1; } + constexpr static int bar = foo(sizeof(int)); // { dg-error "constant expression" } +};