aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2014-01-07 14:57:07 +0100
committergrischka <grischka>2014-01-07 14:57:07 +0100
commit3fe2a95d7fe854c8cf496a009a467bb65cdf030d (patch)
tree217e2470122e020f6c71acf97c2bdaf4d7f5943e /libtcc.c
parent2bd0daabbe1fc40e65e4a4631e68f5ca093ea1fb (diff)
downloadtinycc-3fe2a95d7fe854c8cf496a009a467bb65cdf030d.tar.gz
tinycc-3fe2a95d7fe854c8cf496a009a467bb65cdf030d.tar.bz2
be stricter with aliasing
Refactoring (no logical changes): - use memcpy in tccgen.c:ieee_finite(double d) - use union to store attribute flags in Sym Makefile: "CFLAGS+=-fno-strict-aliasing" basically not necessary anymore but I left it for now because gcc sometimes behaves unexpectedly without. Also: - configure: back to mode 100755 - tcc.h: remove unused variables tdata/tbss_section - x86_64-gen.c: adjust gfunc_sret for prototype
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libtcc.c b/libtcc.c
index 072b77f..154a266 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -493,11 +493,11 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
if (sym->type.t & VT_EXPORT)
other |= 1;
if (sym_type == STT_FUNC && sym->type.ref) {
- int attr = sym->type.ref->r;
- if (FUNC_EXPORT(attr))
+ Sym *ref = sym->type.ref;
+ if (ref->a.func_export)
other |= 1;
- if (FUNC_CALL(attr) == FUNC_STDCALL && can_add_underscore) {
- sprintf(buf1, "_%s@%d", name, FUNC_ARGS(attr) * PTR_SIZE);
+ if (ref->a.func_call == FUNC_STDCALL && can_add_underscore) {
+ sprintf(buf1, "_%s@%d", name, ref->a.func_args * PTR_SIZE);
name = buf1;
other |= 2;
can_add_underscore = 0;