aboutsummaryrefslogtreecommitdiff
path: root/tests/42test.h
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-08-08 22:26:11 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:10 +0100
commitd0d25ec7df636deaf650d31ae3b50e60659f54dd (patch)
tree4eae48c91ac5298b4475e4fc8ed26592f503e658 /tests/42test.h
parent0381387640fecfc1d8bd9e79d972a2b58c508069 (diff)
downloadtinycc-d0d25ec7df636deaf650d31ae3b50e60659f54dd.tar.gz
tinycc-d0d25ec7df636deaf650d31ae3b50e60659f54dd.tar.bz2
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.
Diffstat (limited to 'tests/42test.h')
-rw-r--r--tests/42test.h13
1 files changed, 13 insertions, 0 deletions
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