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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [redef2.c] - Blame information for rev 307

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

Line No. Rev Author Line
1 298 jeremybenn
/* Test for redefining macros with significant differences.  */
2
 
3
/* { dg-do preprocess }
4
   { dg-options "-ansi -Wall" } */
5
 
6
#define mac(a, b) (a) + (b)
7
#define mac(a, b) (a) * (b)
8
#define mac(a, b) (a) * (x)
9
#define mac(a, g) (a) * (x)
10
 
11
#define ro(x) foo x bar
12
#define ro(x, b) foo x bar
13
 
14
#define va(a...) a
15
#define va(...) __VA_ARGS__
16
 
17
#define foo(x) x
18
#define foo(x)x         /* { dg-bogus "redefined" "redefined foo" } */
19
 
20
/* { dg-warning "redefined" "redef mac"     { target *-*-* } 7  }
21
   { dg-warning "redefined" "redef mac"     { target *-*-* } 8  }
22
   { dg-warning "redefined" "redef mac"     { target *-*-* } 9  }
23
   { dg-warning "redefined" "redef ro"      { target *-*-* } 12 }
24
   { dg-warning "redefined" "redef va"      { target *-*-* } 15 }
25
 
26
   { dg-message "previous"  "prev def mac"  { target *-*-* } 6  }
27
   { dg-message "previous"  "prev def mac"  { target *-*-* } 7  }
28
   { dg-message "previous"  "prev def mac"  { target *-*-* } 8  }
29
   { dg-message "previous"  "prev def ro"   { target *-*-* } 11 }
30
   { dg-message "previous"  "prev def va"   { target *-*-* } 14 }
31
*/

powered by: WebSVN 2.1.0

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