diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C new file mode 100644 index 00000000000..4fc8980ef96 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C @@ -0,0 +1,7 @@ +// PR c++/48570 +// { dg-do compile } +// { dg-options -std=c++0x } + +constexpr wchar_t c1 = L"hi"[3]; // { dg-error "out of bound" } +constexpr char16_t c2 = u"hi"[3]; // { dg-error "out of bound" } +constexpr char32_t c3 = U"hi"[3]; // { dg-error "out of bound" } |