Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/cpp/ucs.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line diff
--- a/gcc/testsuite/gcc.dg/cpp/ucs.c Thu Oct 25 07:37:49 2018 +0900 +++ b/gcc/testsuite/gcc.dg/cpp/ucs.c Thu Feb 13 11:34:05 2020 +0900 @@ -16,6 +16,8 @@ #define short +2 #define long +3 +#if !defined(WCHAR_MAX) + #if __WCHAR_TYPE__ == 0 # define WCHAR_MAX INT_MAX #elif __WCHAR_TYPE__ == 1 @@ -28,6 +30,8 @@ # error wacky wchar_t #endif +#endif + #undef unsigned #undef int #undef char @@ -39,7 +43,7 @@ #endif #if WCHAR_MAX >= 0x7ffffff -# if L'\U1234abcd' != 0x1234abcd +# if L'\U1234abcd' != 0x1234abcd /* { dg-warning "outside" "" } */ # error bad long ucs /* { dg-bogus "bad" "bad U1234abcd evaluation" } */ # endif #endif @@ -49,7 +53,7 @@ int c; c = L'\ubad'; /* { dg-error "incomplete" "incomplete UCN 1" } */ - c = L"\U1234"[0]; /* { dg-error "incomplete" "incompete UCN 2" } */ + c = L"\U1234"[0]; /* { dg-error "incomplete" "incomplete UCN 2" } */ c = L'\u000x'; /* { dg-error "incomplete" "non-hex digit in UCN" } */ /* If sizeof(HOST_WIDE_INT) > sizeof(wchar_t), we can get a multi-character @@ -64,4 +68,6 @@ c = '\u0025'; /* { dg-error "not a valid" "0025 invalid UCN" } */ c = L"\uD800"[0]; /* { dg-error "not a valid" "D800 invalid UCN" } */ c = L'\U0000DFFF'; /* { dg-error "not a valid" "DFFF invalid UCN" } */ + + c = L'\U00110000'; /* { dg-warning "outside" "110000 outside UCS" } */ }