gcc/testsuite/g++.dg/ext/utf-type.C
raw| 1 | /* Contributed by Kris Van Hees <[email protected]> */ |
| 2 | /* Ensure that __CHAR16_TYPE__ and __CHAR32_TYPE__ exist, match the types they |
| 3 | are the underlying data type for. */ |
| 4 | /* { dg-do run { target c++11 } } */ |
| 5 | /* { dg-options "-Wall -Werror" } */ |
| 6 | |
| 7 | extern "C" void abort (void); |
| 8 | |
| 9 | int main () |
| 10 | { |
| 11 | if (sizeof (__CHAR16_TYPE__) != sizeof (char16_t)) |
| 12 | abort(); |
| 13 | if (sizeof (__CHAR32_TYPE__) != sizeof (char32_t)) |
| 14 | abort(); |
| 15 | } |