Insert spaces between certain tokens when tcc is invoked with -E.

Insert a space when it is required to prevent mistokenisation of
the output, and also in a few cases where it is not strictly
required, imitating GCC's behaviour.
This commit is contained in:
Edmund Grimley Evans
2016-05-04 21:37:11 +01:00
parent 75243f744c
commit f5f82abc99
4 changed files with 78 additions and 3 deletions

2
TODO
View File

@ -31,7 +31,6 @@ Bugs:
- make libtcc fully reentrant (except for the compilation stage itself).
- struct/union/enum definitions in nested scopes (see also Debian bug #770657)
- __STDC_IEC_559__: float f(void) { static float x = 0.0 / 0.0; return x; }
- preprocessor: #define Y(x) Z(x) {newline} #define X Y {newline} X(X(1))
Portability:
@ -94,7 +93,6 @@ Not critical:
- handle void (__attribute__() *ptr)()
- VLAs are implemented in a way that is not compatible with signals:
http://lists.gnu.org/archive/html/tinycc-devel/2015-11/msg00018.html
- output with -E should include spaces: #define n 0xe {newline} n+1
Fixed (probably):