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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [trigraphs.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-ansi" } */
3
 
4
extern void abort (void);
5
 
6
/* Basic tests for trigraph conversion.
7
   All of them are here, but not in all possible contexts.  *??/
8
/
9
 
10
??=include <stdio.h>
11
 
12
??=define TWELVE 1??/
13
2
14
 
15
static const char str??(??) = "0123456789??/n";
16
 
17
int
18
main(void)
19
??<
20
  unsigned char x = 5;
21
 
22
  if (sizeof str != TWELVE)
23
    abort ();
24
 
25
  /* Test ^=, the only multi-character token to come from trigraphs.  */
26
  x ??'= 3;
27
  if (x != 6)
28
    abort ();
29
 
30
  if ((5 ??! 3) != 7)
31
    abort ();
32
 
33
  return 0;
34
??>

powered by: WebSVN 2.1.0

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