diff options
| author | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2015-11-21 11:23:53 +0000 |
|---|---|---|
| committer | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2015-11-26 12:40:50 +0000 |
| commit | 1c2dfa1f4bb162678c293788678f6790514cb7ba (patch) | |
| tree | 19839532c07194f05bb5dcba8d5846256dd3eb62 /tcc.h | |
| parent | 4886d2c64002cfa616bf68875a1fc66e27854e9a (diff) | |
| download | tinycc-1c2dfa1f4bb162678c293788678f6790514cb7ba.tar.gz tinycc-1c2dfa1f4bb162678c293788678f6790514cb7ba.tar.bz2 | |
Change the way struct CStrings are handled.
A CString used to be copied into a token string, which is an int array.
On a 64-bit architecture the pointers were misaligned, so ASan gave
lots of warnings. On a 64-bit architecture that required memory
accesses to be correctly aligned it would not work at all.
The CString is now included in CValue instead.
Diffstat (limited to 'tcc.h')
| -rw-r--r-- | tcc.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -400,7 +400,11 @@ typedef union CValue { double d; float f; uint64_t i; - struct CString *cstr; + struct { + int size; + const void *data; + void *data_allocated; + } str; int tab[LDOUBLE_SIZE/4]; } CValue; |
