Skip to content

Commit d34160d

Browse files
Merge pull request #482 from Wuerfel21/W21-ignore-underscore-const
Don't emit underscore constant when compiling for P2, fixes #481
2 parents 2166a5a + d228a87 commit d34160d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backends/asm/outasm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6651,6 +6651,10 @@ CompileConstant(IRList *irl, AST *ast, bool skip_clkfreq, bool skip_clkmode)
66516651
}
66526652
expr = (AST *)sym->v.ptr;
66536653
if (!expr) return;
6654+
if (gl_p2 && !strcasecmp(name,"_")) {
6655+
// This causes assembly to break, so just omit it
6656+
return;
6657+
}
66546658
if (skip_clkfreq && !strcasecmp(name, "_clkfreq")) {
66556659
return;
66566660
}

0 commit comments

Comments
 (0)