diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/utf-type.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.dg/utf-type.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/utf-type.c b/gcc-4.9/gcc/testsuite/gcc.dg/utf-type.c new file mode 100644 index 000000000..1aa6020cb --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/utf-type.c @@ -0,0 +1,18 @@ +/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */ +/* Ensure that __CHAR16_TYPE__ and __CHAR32_TYPE__ exist, and are of the + correct width. */ +/* { dg-do run } */ +/* { dg-options "-std=gnu99 -Wall -Werror" } */ + +typedef __CHAR16_TYPE__ char16_t; +typedef __CHAR32_TYPE__ char32_t; + +extern void abort (void); + +int main () +{ + if (sizeof (char16_t) != sizeof (u'a')) + abort(); + if (sizeof (char32_t) != sizeof (U'a')) + abort(); +} |