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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [strify4.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* Tests we stringify without changing unprintable characts.
3
 
4
   Andrew Pinski */
5
 
6
extern int strcmp (const char *, const char *);
7
extern int puts (const char *);
8
extern void abort (void);
9
#define err(str) do { puts(str); abort(); } while (0)
10
 
11
 
12
#define S(X) S2(X)
13
#define S2(X) #X
14
#define TAB "   " /* Note there is a tab character here. */
15
 
16
int main (int argc, char *argv[])
17
{
18
  /* The space before "bar" here is vital.  */
19
  char a[] = S(S(TAB));
20
 
21
  if (strcmp (a, "\"\\\"        \\\"\""))
22
    err ("stringification caused octal");
23
 
24
  return 0;
25
}

powered by: WebSVN 2.1.0

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