diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-07-13 21:16:05 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-07-13 21:16:05 +0400 |
commit | fed61a547f9c370223a6502200ff2c95373aa312 (patch) | |
tree | 2126314ebc60a3d81e3d6c5b39746abf6f3bcf32 | |
parent | dc2152ed0a3a889fff90a100f32522325c0dc369 (diff) | |
parent | 984279b1dde9db0cc8bb27d812cd3ad98ca34162 (diff) | |
download | nasm-fed61a547f9c370223a6502200ff2c95373aa312.tar.gz |
Merge branches 'master' and 'preproc-paste-fix'
-rw-r--r-- | preproc.c | 20 | ||||
-rw-r--r-- | test/paste.asm | 12 | ||||
-rw-r--r-- | version | 2 |
3 files changed, 16 insertions, 18 deletions
@@ -3509,7 +3509,6 @@ static bool paste_tokens(Token **head, bool handle_paste_tokens) } break; case TOK_ID: - case TOK_PREPROC_ID: case TOK_NUMBER: case TOK_FLOAT: { @@ -3586,7 +3585,9 @@ static bool paste_tokens(Token **head, bool handle_paste_tokens) } /* else fall through */ default: - tail = paste_head = &t->next; + tail = &t->next; + if (!tok_type_(t->next, TOK_WHITESPACE)) + paste_head = tail; break; } } @@ -3820,21 +3821,6 @@ static Token *expand_mmac_params(Token * tline) } delete_Token(t); changed = true; - } else if (tline->type == TOK_PREPROC_ID && - tline->text[0] == '%' && tline->text[1] == '$') { - /* expand local macro */ - t = tline; - tline = tline->next; - tt = tokenize(t->text); - tt = expand_smacro(tt); - *tail = tt; - while (tt) { - tt->a.mac = NULL; - tail = &tt->next; - tt = tt->next; - } - delete_Token(t); - changed = true; } else { t = *tail = tline; tline = tline->next; diff --git a/test/paste.asm b/test/paste.asm new file mode 100644 index 00000000..0bc48384 --- /dev/null +++ b/test/paste.asm @@ -0,0 +1,12 @@ +%macro bug 1-* + %push foo + %define %$v %1 + %define vv %$v_ %+ %1 + %%top_{%$v}%1: + mov eax, eax + mov eax, %%top_{%$v}%1 + mov eax, vv + %pop +%endmacro + +bug a @@ -1 +1 @@ -2.09rc2 +2.09rc3 |