Hi all,
there is a patch for the problem. Any suggestions?
diff -urN tinycc.old/tccasm.c tinycc/tccasm.c
--- tinycc.old/tccasm.c 2015-05-18 12:30:24.000000000 +0300
+++ tinycc/tccasm.c 2015-05-18 16:28:03.000000000 +0300
@@ -779,6 +779,16 @@
opcode = tok;
next();
if (tok == ':') {
+ /* handle "extern void vide(void); __asm__("vide: ret");" as
+ "__asm__("globl vide\nvide: ret");" */
+ Sym *sym = sym_find(opcode);
+ if (sym && (sym->type.t & VT_EXTERN)) {
+ sym = label_find(opcode);
+ if (!sym) {
+ sym = label_push(&s1->asm_labels, opcode, 0);
+ sym->type.t = VT_VOID;
+ }
+ }
/* new label */
asm_new_label(s1, opcode, 0);
next();
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel