URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
/* { dg-do run } */
|
/* { dg-do run } */
|
|
|
/* Test for odd corner cases in stringizing/pasting.
|
/* Test for odd corner cases in stringizing/pasting.
|
Taken more or less verbatim from C99 section 6.10.3.3. */
|
Taken more or less verbatim from C99 section 6.10.3.3. */
|
|
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <string.h>
|
#include <string.h>
|
|
|
#define hash_hash # ## #
|
#define hash_hash # ## #
|
#define mkstr(a) # a
|
#define mkstr(a) # a
|
#define in_between(a) mkstr(a)
|
#define in_between(a) mkstr(a)
|
#define join(c, d) in_between(c hash_hash d)
|
#define join(c, d) in_between(c hash_hash d)
|
|
|
const char p[] = join(x, y);
|
const char p[] = join(x, y);
|
const char q[] = "x ## y";
|
const char q[] = "x ## y";
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
if (strcmp (p, q))
|
if (strcmp (p, q))
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.