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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [escape.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* Copyright (C) 2001 Free Software Foundation, Inc.  */
2
 
3
/* { dg-do compile } */
4
/* { dg-options "-Wtraditional -std=c89 -fno-show-column" } */
5
 
6
/* This tests various diagnostics with -Wtraditioanl about escape
7
   sequences, for both the preprocessor and the compiler.
8
 
9
   Neil Booth, 22 May 2001.  */
10
 
11
#if '\a'                /* { dg-warning "traditional" "traditional bell" } */
12
#endif
13
#if '\x1a' != 26        /* { dg-warning "traditional" "traditional hex" } */
14
 #error bad hex         /* { dg-bogus "bad" "bad hexadecimal evaluation" } */
15
#endif
16
#if L'\u00a1'           /* { dg-warning "only valid" "\u is unknown in C89" } */
17
#endif
18
 
19
void foo ()
20
{
21
  int c = '\a';         /* { dg-warning "traditional" "traditional bell" } */
22
 
23
  c = '\xa1';           /* { dg-warning "traditional" "traditional hex" } */
24
  c = L'\u00a1';        /* { dg-warning "only valid" "\u is unknown in C89" } */
25
}

powered by: WebSVN 2.1.0

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