OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [utf8-2.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target wchar } */
3
/* { dg-options "-std=gnu99" } */
4
 
5
#include <wchar.h>
6
 
7
typedef __CHAR16_TYPE__ char16_t;
8
typedef __CHAR32_TYPE__ char32_t;
9
 
10
const char      s0[]    = u8"ab";
11
const char16_t  s1[]    = u8"ab";       /* { dg-error "from non-wide" } */
12
const char32_t  s2[]    = u8"ab";       /* { dg-error "from non-wide" } */
13
const wchar_t   s3[]    = u8"ab";       /* { dg-error "from non-wide" } */
14
 
15
const char      t0[0]   = u8"ab";        /* { dg-warning "chars is too long" } */
16
const char      t1[1]   = u8"ab";       /* { dg-warning "chars is too long" } */
17
const char      t2[2]   = u8"ab";
18
const char      t3[3]   = u8"ab";
19
const char      t4[4]   = u8"ab";
20
 
21
const char      u0[0]   = u8"\u2160.";   /* { dg-warning "chars is too long" } */
22
const char      u1[1]   = u8"\u2160.";  /* { dg-warning "chars is too long" } */
23
const char      u2[2]   = u8"\u2160.";  /* { dg-warning "chars is too long" } */
24
const char      u3[3]   = u8"\u2160.";  /* { dg-warning "chars is too long" } */
25
const char      u4[4]   = u8"\u2160.";
26
const char      u5[5]   = u8"\u2160.";
27
const char      u6[6]   = u8"\u2160.";

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.