summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Fried <andreas.fried@kit.edu>2018-08-22 16:08:34 +0200
committerAndreas Fried <andreas.fried@kit.edu>2018-08-22 16:08:34 +0200
commit9c1ed13e1fb503f233bfaa1ab52297212402b132 (patch)
treedd39fd49e4be253c5076249dced1179f113aeb18
parentfc851301e9d92a6faae672d636ff34573016dffe (diff)
Remove unneeded assertion for "## argument".
The assertion asserts that when expanding "## argument" we are not inside another macro call. However, this invariant does not hold, as the following code is valid and compiles fine without the assertion: #define A(x,y) x##y #define ID(x) x ID(A(x,y)) Fixes preproctest/bug3.c, preproctest/pp_error5.c, preproctest/should_fail/call4.c, and C/cp_error086.c.
-rw-r--r--src/parser/preprocessor.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/parser/preprocessor.c b/src/parser/preprocessor.c
index 4be4738..45fc35d 100644
--- a/src/parser/preprocessor.c
+++ b/src/parser/preprocessor.c
@@ -1390,7 +1390,6 @@ static bool concat_macro_parameters(const position_t *pos,
}
}
- assert(current_call.macro == NULL);
assert(obstack_object_size(&pp_obstack) == 0);
pp_definition_t *const newdef = OALLOCZ(&pp_obstack, pp_definition_t);
newdef->symbol = sym_anonymous;