diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-08-29 15:58:26 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-08-29 15:58:26 +0000 |
commit | f71f9d3fb6156edd82822ad9a26d3e4c6495d041 (patch) | |
tree | 2111b5ca6d69eda153ca6f6766f978d964f40c1c /gcc | |
parent | 21cfc3a51db72578880c8344ebfa78605a7ab12d (diff) | |
download | gcc-f71f9d3fb6156edd82822ad9a26d3e4c6495d041.zip gcc-f71f9d3fb6156edd82822ad9a26d3e4c6495d041.tar.gz gcc-f71f9d3fb6156edd82822ad9a26d3e4c6495d041.tar.bz2 |
re PR c++/54002 ([C++0x] Initializing constexpr static member using constexpr static method fails)
2014-08-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54002
* g++.dg/cpp0x/constexpr-54002.C: New.
From-SVN: r214734
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-54002.C | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3d774a0..564b821 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2014-08-29 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/54002 + * g++.dg/cpp0x/constexpr-54002.C: New. + +2014-08-29 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/56991 * g++.dg/cpp0x/constexpr-56991.C: New. 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 0000000..125a18d --- /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" } +}; |