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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [redef2.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test for redefining macros with significant differences.  */
2
 
3
/* { dg-do preprocess }
4
   { dg-options "-ansi -Wall -fno-show-column" } */
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-warning "previous"  "prev def mac"  { target *-*-* } 6  }
27
   { dg-warning "previous"  "prev def mac"  { target *-*-* } 7  }
28
   { dg-warning "previous"  "prev def mac"  { target *-*-* } 8  }
29
   { dg-warning "previous"  "prev def ro"   { target *-*-* } 11 }
30
   { dg-warning "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.