From 638e666c42bcc3f65499baa0660d558a2b40ad8f Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 18 May 2003 18:48:33 +0000 Subject: fixed zero arg macro parse --- tcctest.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tcctest.c') diff --git a/tcctest.c b/tcctest.c index 695ddfa..494b4db 100644 --- a/tcctest.c +++ b/tcctest.c @@ -253,6 +253,12 @@ void macro_test(void) /* test macro substituion inside args (should not eat stream) */ printf("qq=%d\n", qq(qq)(2)); + /* test zero argument case. NOTE: gcc 2.95.x does not accept a + null argument without a space. gcc 3.2 fixes that. */ + +#define qq1(x) 1 + printf("qq1=%d\n", qq1( )); + /* comment with stray handling *\ / /* this is a valid *\/ comment */ -- cgit v1.3.1