diff options
| -rw-r--r-- | tccasm.c | 5 | ||||
| -rw-r--r-- | tccpp.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -691,8 +691,11 @@ static int tcc_assemble_internal(TCCState *s1, int do_preprocess) opcode = tok; next(); if (tok == ':') { + char * label = get_tok_str(opcode, NULL); + /* new label */ - asm_new_label(s1, opcode, 0); + asm_new_label(s1, opcode, + (label && label[0] == '.' && label[1] == 'L') ? 1 : 0); next(); goto redo; } else if (tok == '=') { @@ -2279,6 +2279,12 @@ maybe_newline: tok = TOK_PPNUM; break; case '.': + /* check first for a local label (.Lxx:) */ + if (p[1] == 'L') { + /* fast case */ + goto parse_ident_fast; + } + /* special dot handling because it can also start a number */ PEEKC(c, p); if (isnum(c)) { |
