tccgen: asm_label cleanup

- avoid memory allocation by using its (int) token number
- avoid additional function parameter by using Attribute

Also: fix some strange looking error messages
This commit is contained in:
grischka
2015-11-20 11:22:56 +01:00
parent 992cbda8d0
commit 54cf57ab1a
4 changed files with 42 additions and 42 deletions

10
tccpp.c
View File

@ -334,10 +334,18 @@ ST_FUNC const char *get_tok_str(int v, CValue *cv)
break;
case TOK_CFLOAT:
cstr_cat(&cstr_buf, "<float>");
break;
case TOK_CDOUBLE:
cstr_cat(&cstr_buf, "<double>");
break;
case TOK_CLDOUBLE:
cstr_cat(&cstr_buf, "<long double>");
break;
case TOK_LINENUM:
return NULL; /* should not happen */
cstr_cat(&cstr_buf, "<linenumber>");
break;
//return NULL; /* should not happen */
/* above tokens have value, the ones below don't */