9 Commits

Author SHA1 Message Date
Olaf Seibert
706e4e9758 Clang found an uninitialized pointer. 2021-01-23 22:06:12 +01:00
Olaf Seibert
433e8ecda6 Add comment on a format strictness. ...
Remove unneeded #define.
2016-10-22 15:13:34 +02:00
Olaf Seibert
d6ff111149 Introduce a function to create a binary expression node. 2015-11-08 20:51:07 +01:00
Olaf Seibert
40ff236aaf Make free(tp) common code. 2015-11-08 20:49:37 +01:00
Olaf Seibert
d38f4009c4 Crank up the warning levels, and adjust the code to silence ...
several compilers:
- gcc version 4.5.3 (NetBSD nb2 20110806)
- gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
- Ubuntu clang version 3.6.0-2ubuntu1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)

The warnings were mostly about local variables shadowing others,
unused function parameters, and C++ style comments. Some variables were
indeed used before set.

Note that on Linux, using -std=c99 does stupid things like *remove* the
declaration of strdup() from <string.h>. Therefore I've reluctantly used
-std=gnu99.
2015-05-27 21:51:26 +02:00
Olaf Seibert
8433503792 Make sure that undefined global symbols don't get reduced to 0 when negated
Test case:

        ; test complex relocations

        ; .globl  IE.ITS,IE.MON ; implicit
        mov     #-IE.ITS, space

space:  .word   IE.ITS    ; the only simple relocation
        .word   -IE.ITS   ; all others are complex relocations
        .word   ^C<IE.ITS>
        .word   IE.ITS + IE.MON
        .word   IE.ITS - IE.MON
        .word   IE.ITS * IE.MON
        .word   IE.ITS / IE.MON
        .word   IE.ITS & IE.MON
        .word   IE.ITS ! IE.MON
2015-05-21 23:21:19 +02:00
Olaf Seibert
2bc55f39f3 Add debug flag to command line interpretation. 2015-05-10 17:39:38 +02:00
Olaf Seibert
cf320a2e60 Fix use-after-free errors.
evaluate() would not-quite-copy the original tree, which often would
get freed afterward. Including the shared parts.
Also fixed the case where evaluate() would turn a EX_NEG node into an
EX_COM node.
2015-05-07 23:26:38 +02:00
Sergey Svishchev
6a2afc3fa7 Import J Hoppe's 20090427 release from http://retrocmp.com/tools/macro-11-on-windows 2013-02-15 23:50:38 +04:00