From dcd65f18f8908dd9ee8eaa68974dcb87c8ae333e Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 24 Apr 2013 11:21:04 +0200 Subject: [PATCH] recognize the simple case of __FUNC__ in the parser --- parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parser.c b/parser.c index cc0d6f3..d480e1f 100755 --- a/parser.c +++ b/parser.c @@ -1888,6 +1888,8 @@ static bool parse_sya_operand(parser_t *parser, shunt *sy, bool with_labels) vec_push(parser->labels, lbl); } } + if (!var && !strcmp(parser_tokval(parser), "__FUNC__")) + var = (ast_expression*)parser_const_string(parser, parser->function->name, false); if (!var) { /* intrinsics */ if (!strcmp(parser_tokval(parser), "__builtin_debug_typestring")) { -- 2.39.2