view gcc/testsuite/gcc.dg/utf-type.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 source

/* 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();
}