mirror of
https://github.com/frida/tinycc
synced 2024-12-25 06:26:49 +03:00
tccpp: Allow local labels to start with a dot
-- By by ... Detlef
This commit is contained in:
parent
9ff7a0bc98
commit
f740485a5a
5
tccasm.c
5
tccasm.c
@ -691,8 +691,11 @@ static int tcc_assemble_internal(TCCState *s1, int do_preprocess)
|
|||||||
opcode = tok;
|
opcode = tok;
|
||||||
next();
|
next();
|
||||||
if (tok == ':') {
|
if (tok == ':') {
|
||||||
|
char * label = get_tok_str(opcode, NULL);
|
||||||
|
|
||||||
/* new label */
|
/* new label */
|
||||||
asm_new_label(s1, opcode, 0);
|
asm_new_label(s1, opcode,
|
||||||
|
(label && label[0] == '.' && label[1] == 'L') ? 1 : 0);
|
||||||
next();
|
next();
|
||||||
goto redo;
|
goto redo;
|
||||||
} else if (tok == '=') {
|
} else if (tok == '=') {
|
||||||
|
6
tccpp.c
6
tccpp.c
@ -2279,6 +2279,12 @@ maybe_newline:
|
|||||||
tok = TOK_PPNUM;
|
tok = TOK_PPNUM;
|
||||||
break;
|
break;
|
||||||
case '.':
|
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 */
|
/* special dot handling because it can also start a number */
|
||||||
PEEKC(c, p);
|
PEEKC(c, p);
|
||||||
if (isnum(c)) {
|
if (isnum(c)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user