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] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "-ansi" } */
/* { dg-options "-ansi" } */
 
 
extern void abort (void);
extern void abort (void);
 
 
/* Basic tests for trigraph conversion.
/* Basic tests for trigraph conversion.
   All of them are here, but not in all possible contexts.  *??/
   All of them are here, but not in all possible contexts.  *??/
/
/
 
 
??=include <stdio.h>
??=include <stdio.h>
 
 
??=define TWELVE 1??/
??=define TWELVE 1??/
2
2
 
 
static const char str??(??) = "0123456789??/n";
static const char str??(??) = "0123456789??/n";
 
 
int
int
main(void)
main(void)
??<
??<
  unsigned char x = 5;
  unsigned char x = 5;
 
 
  if (sizeof str != TWELVE)
  if (sizeof str != TWELVE)
    abort ();
    abort ();
 
 
  /* Test ^=, the only multi-character token to come from trigraphs.  */
  /* Test ^=, the only multi-character token to come from trigraphs.  */
  x ??'= 3;
  x ??'= 3;
  if (x != 6)
  if (x != 6)
    abort ();
    abort ();
 
 
  if ((5 ??! 3) != 7)
  if ((5 ??! 3) != 7)
    abort ();
    abort ();
 
 
  return 0;
  return 0;
??>
??>
 
 

powered by: WebSVN 2.1.0

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