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/] [c99-digraph-1.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Test for recognition of digraphs: should be recognized in C94 and C99
2
   mode, but not in C90 mode.  Also check correct stringizing.
3
*/
4
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
5
/* { dg-do run } */
6
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
7
 
8
#define str(x) xstr(x)
9
#define xstr(x) #x
10
#define foo(p, q) str(p %:%: q)
11
 
12
extern void abort (void);
13
extern int strcmp (const char *, const char *);
14
 
15
int
16
main (void)
17
{
18
  const char *t = foo (1, 2);
19
  const char *u = str (<:);
20
  if (strcmp (t, "12") || strcmp (u, "<:"))
21
    abort ();
22
  else
23
    return 0;
24
}

powered by: WebSVN 2.1.0

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