tccgen: nodata_wanted
commit7f1ab9b1e111b9ea9261eec4b7c6fb0f42591eef
authorgrischka <grischka>
Sun, 16 Jul 2017 10:10:00 +0000 (16 12:10 +0200)
committergrischka <grischka>
Sun, 16 Jul 2017 10:10:00 +0000 (16 12:10 +0200)
tree303c1656ec1a7023247fad8047f3b86acd3542c6
parent69a137ff889f552b3ce58b861f3f0601c1818d6b
tccgen: nodata_wanted

The existing variable 'nocode_wanted' is now used to control
output of static data too. So...

(nocode_wanted == 0)
    code and data (normal within functions)
(nocode_wanted < 0)
    means: no code, but data (global or static data)
(nocode_wanted > 0)
    means: no code and no data (code and data suppressed)
(nocode_wanted & 0xC0000000)
    means:  we're in declaration of static data

Also: new option '-dT' to be used with -run
    tcc -dT -run file.c
This will look in file.c for certain comment-boundaries:
    /*-* test-xxx: ...some description */
and then for each test below run it from memory.  This way
various features and error messages can be tested with one
single file.  See 96_nodata_wanted.c for an example.

Also: tccgen.c: one more bitfield fix
libtcc.c
tcc.c
tcc.h
tccgen.c
tcctools.c
tests/tests2/95_bitfields.c
tests/tests2/95_bitfields_ms.expect
tests/tests2/96_nodata_wanted.c [new file with mode: 0644]
tests/tests2/96_nodata_wanted.expect [new file with mode: 0644]
tests/tests2/Makefile