summarylogtreecommitdiffstats
path: root/0023-Fix-__VA_ARGS__-expansion-in-macro-if-variable-argum.patch
diff options
context:
space:
mode:
authorSergei Litvin2018-09-15 09:05:21 +0300
committerSergei Litvin2018-09-15 09:05:21 +0300
commitcc7efd00835a7a4055510d346b4a068bde18dc56 (patch)
tree3ab00f55b627b3b67dd80c6aad2eb614cb21a7cf /0023-Fix-__VA_ARGS__-expansion-in-macro-if-variable-argum.patch
downloadaur-cc7efd00835a7a4055510d346b4a068bde18dc56.tar.gz
Initial commit
Diffstat (limited to '0023-Fix-__VA_ARGS__-expansion-in-macro-if-variable-argum.patch')
-rw-r--r--0023-Fix-__VA_ARGS__-expansion-in-macro-if-variable-argum.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/0023-Fix-__VA_ARGS__-expansion-in-macro-if-variable-argum.patch b/0023-Fix-__VA_ARGS__-expansion-in-macro-if-variable-argum.patch
new file mode 100644
index 00000000000..0e1cc90fb1c
--- /dev/null
+++ b/0023-Fix-__VA_ARGS__-expansion-in-macro-if-variable-argum.patch
@@ -0,0 +1,28 @@
+From 3274f5bae444c2bc62011598a85edeecaad979b9 Mon Sep 17 00:00:00 2001
+From: Sergei Litvin <litvindev@gmail.com>
+Date: Thu, 22 Jun 2017 20:38:52 +0300
+Subject: [PATCH 23/33] Fix ##__VA_ARGS__ expansion in macro if variable
+ arguments are omitted
+
+---
+ src/yylex.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/yylex.c b/src/yylex.c
+index 0af4dcc..5cb5ff5 100644
+--- a/src/yylex.c
++++ b/src/yylex.c
+@@ -1327,6 +1327,10 @@ static void collate(char **albcc, char **abcc, char *buf, int *absize,
+ GetLexToken(lex, ncc);
+ PassLex(ncc, lex, line, val, hash, pos, len, 0);
+ cc = actArgs[val].a; ccfin = actArgs[val].fin;
++ if (! (cc < ccfin) && NextLexToken(lbcc) == ',') {
++ bcc = lbcc;
++ lbcc = NULL;
++ }
+ } else {
+ cc = ncc;
+ GetLexToken(lex, ncc);
+--
+2.18.0
+