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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [strp1.c] - Rev 816

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

/* { dg-do run } */
 
/* Regression test for stringizing and token pasting.
   We got internal escape markers in the strings.  */
 
#include <string.h>
#include <stdlib.h>
 
#define S(x) _S(x)
#define _S(x) #x
 
#define I 1
static const char s1[] = S(I.1);
static const char t1[] = "1.1";
 
#define f h
#define h(a) a+f
static const char s2[] = S( f(1)(2) );
static const char t2[] = "1+h(2)";
 
#undef I
#undef f
#undef h
 
int
main(void)
{
  if (strcmp (s1, t1))
    abort ();
 
  if (strcmp (s2, t2))
    abort ();
 
  return 0;
}
 

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

powered by: WebSVN 2.1.0

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