Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / support / valdiag / tests / strings.c
blob342c0f1b4e8812f86f454c6778259a90810c311d
1 #include <wchar.h>
2 #include <uchar.h>
4 // Concatenation of string literals, some prefixed, all prefixed ones have same prefix. Allowed.
5 #ifdef TEST1
6 const char *str1 = u8"testu8" "test" u8"testu8";
7 const char *str2 = u8"testu8" u8"testu8";
8 const char *str3 = u8"testu8" u8"testu8" u8"testu8";
9 const char16_t *str4 = u"testu8" "test";
10 const char32_t *str5 = U"testu8" "test";
11 #endif
13 // Concatenation of string literals, some prefixed, prefixed have different prefixes. Implementation-defined in C11, C17. Requires diagnostic in C23.
14 #ifdef TEST2
15 const char *str1 = u8"testu8" "test" u"testu"; /* WARNING(SDCC) */ /* IGNORE(GCC) */
16 #endif
18 #ifdef TEST3
19 const char *str1 = u8"testu8" "test" L"testL"; /* WARNING(SDCC) */ /* IGNORE(GCC) */
20 #endif
22 #ifdef TEST4
23 const char *str1 = L"testuL" "test" u"testu"; /* WARNING(SDCC) */ /* IGNORE(GCC) */
24 #endif
26 #ifdef TEST5
27 const char32_t *str1 = U"testU" "test" u"testu"; /* WARNING(SDCC) */ /* IGNORE(GCC) */
28 #endif
30 #ifdef TEST6
31 const char32_t *str1 = U"testU" u"testu"; /* WARNING(SDCC) */ /* IGNORE(GCC) */
32 #endif
34 #ifdef TEST7
35 const char32_t *str1 = U"testU" L"testL"; /* WARNING(SDCC) */ /* IGNORE(GCC) */
36 #endif
38 #ifdef TEST8
39 const wchar_t *str1 = L"testL" u"testu"; /* WARNING(SDCC) */ /* IGNORE(GCC) */
40 #endif