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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [macro5.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do preprocess } */
2
 
3
/* Test source Robert Lipe, with minor modifications for the testsuite
4
   by Neil Booth.  29 Oct 2000.  */
5
 
6
#define _VA_ARGS_0() 42
7
#define _L_0()                      (
8
#define _R_0()                      )
9
 
10
#define __VA_ARGLIST(argc,list) \
11
                _VA_ARGS_##argc list
12
 
13
#define _CAT_LIST(argc,list1,list2) \
14
                _L_##argc list1 _R_##argc list2
15
 
16
#define _VA_ARGLIST(argc,list1,list2) \
17
                __VA_ARGLIST(argc, \
18
                        _CAT_LIST(argc, list1, list2))
19
 
20
#define BLAH(a) _VA_ARGLIST(a, (), ())
21
 
22
#if BLAH (0) != 42
23
#error Simulated varargs macros
24
#endif

powered by: WebSVN 2.1.0

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