aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/preprocessor11.c
diff options
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-06-08 11:23:40 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:06 -0700
commit8793aa6363551e96ab623e2927fcc13bb7b84e69 (patch)
treeef3adbdd252c555d4199e38bcd41bf6e03922c41 /validation/preprocessor11.c
parent7e18e251c72d92c73b3b6cfcff0877bcb433fdb2 (diff)
downloadsparse-dev-8793aa6363551e96ab623e2927fcc13bb7b84e69.tar.gz
[PATCH] saner handling of argument lists
This does two things: a) get C99 varargs to use the same mechanism as gcc ones use - all we need is to internally convert final ... in the list to ident[__VA_ARGS__] and set its ->next to &variable_argument. After that we don't need any special-casing for them. b) take parsing the argument list in a separate function and does it with all sanity checks; normally it ends up with fewer tests than old variant.
Diffstat (limited to 'validation/preprocessor11.c')
-rw-r--r--validation/preprocessor11.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/validation/preprocessor11.c b/validation/preprocessor11.c
new file mode 100644
index 00000000..4c6c1c0a
--- /dev/null
+++ b/validation/preprocessor11.c
@@ -0,0 +1,10 @@
+#define A(1) x
+#define B(x
+#define C(x,
+#define D(,)
+#define E(__VA_ARGS__)
+#define F(x+
+#define G(x...,
+#define H(x...,y)
+#define I(...+
+#define J(x,y)