From d0d25ec7df636deaf650d31ae3b50e60659f54dd Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 8 Aug 2016 22:26:11 +0200 Subject: tccpp: Allow computed include like 42.h The include directive needs to be parsed as pp-tokens, not as token (i.e. no conversion to TOK_STR or TOK_NUM). Also fix parsing computed includes using quoted strings. --- tests/42test.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/42test.h (limited to 'tests/42test.h') diff --git a/tests/42test.h b/tests/42test.h new file mode 100644 index 0000000..5db7d1c --- /dev/null +++ b/tests/42test.h @@ -0,0 +1,13 @@ +/* This file is to test compute #include directives. It's named so + that it starts with a pre-processing number which isn't a valid + number (42test.h). Including this must work. */ +#ifndef INC42_FIRST +int have_included_42test_h; +#define INC42_FIRST +#elif !defined INC42_SECOND +#define INC42_SECOND +int have_included_42test_h_second; +#else +#define INC42_THIRD +int have_included_42test_h_third; +#endif -- cgit v1.3.1