From 4386b4566b18e93fd652c9dd700f750267d9f895 Mon Sep 17 00:00:00 2001 From: bellard Date: Fri, 17 Jun 2005 22:06:18 +0000 Subject: [PATCH] macro function test --- tcctest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tcctest.c b/tcctest.c index ccb9432..70f2d9b 100644 --- a/tcctest.c +++ b/tcctest.c @@ -132,6 +132,10 @@ int qq(int x) } #define qq(x) x +#define spin_lock(lock) do { } while (0) +#define wq_spin_lock spin_lock +#define TEST2() wq_spin_lock(a) + void macro_test(void) { printf("macro:\n"); @@ -268,6 +272,10 @@ void macro_test(void) /* this is a valid comment *\*/ // this is a valid\ comment + + /* test function macro substitution when the function name is + substituted */ + TEST2(); } int op(a,b)