URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
149 |
jeremybenn |
/* Test for redefining traditional macros with significant differences. */
|
2 |
|
|
|
3 |
|
|
/* { dg-do preprocess } */
|
4 |
|
|
|
5 |
|
|
#define foo bar /* { dg-warning "previous def" "foo prev def" } */
|
6 |
|
|
#define foo barr /* { dg-warning "redefined" "foo redefined" } */
|
7 |
|
|
|
8 |
|
|
#undef foo
|
9 |
|
|
#define foo bar /* { dg-warning "previous def" "foo prev def 2" } */
|
10 |
|
|
#define foo() bar /* { dg-warning "redefined" "foo redefined 2" } */
|
11 |
|
|
|
12 |
|
|
#undef foo
|
13 |
|
|
#define foo() bar /* { dg-warning "previous def" "foo prev def" } */
|
14 |
|
|
#define foo() barr /* { dg-warning "redefined" "foo redefined" } */
|
15 |
|
|
|
16 |
|
|
#define quux(thud) a thud b /* { dg-warning "previous def" "quux prev def" } */
|
17 |
|
|
#define quux(thu) a thud b /* { dg-warning "redefined" "quux redefined" } */
|
18 |
|
|
|
19 |
|
|
#define bar(x, y) x+y /* { dg-warning "previous def" "bar prev def" } */
|
20 |
|
|
#define bar(x, y) x+x /* { dg-warning "redefined" "bar redefined" } */
|
21 |
|
|
|
22 |
|
|
#define bat(x, y) x+y /* { dg-warning "previous def" "bat prev def" } */
|
23 |
|
|
#define bat(x, y) x+ y /* { dg-warning "redefined" "bat redefined" } */
|
24 |
|
|
|
25 |
|
|
#define baz(x, y) x+y /* { dg-warning "previous def" "baz prev def" } */
|
26 |
|
|
#define baz(x, y) x +y /* { dg-warning "redefined" "baz redefined" } */
|
27 |
|
|
|
28 |
|
|
#define f(x, y) "x y" /* { dg-warning "previous def" "f prev def" } */
|
29 |
|
|
#define f(x, y) "x y" /* { dg-warning "redefined" "f redefined" } */
|
30 |
|
|
|
31 |
|
|
#define g(x, y) 'x' /* { dg-warning "previous def" "g prev def" } */
|
32 |
|
|
#define g(x, y) ' x' /* { dg-warning "redefined" "g redefined" } */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.