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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f71f9d3fb6156edd82822ad9a26d3e4c6495d041;p=gcc.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 3d774a075c1..564b821f7c5 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 00000000000..125a18d8e9e --- /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" } +};