diff options
| author | grischka <grischka> | 2017-07-16 12:10:00 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2017-07-16 12:10:00 +0200 |
| commit | 7f1ab9b1e111b9ea9261eec4b7c6fb0f42591eef (patch) | |
| tree | 303c1656ec1a7023247fad8047f3b86acd3542c6 /libtcc.c | |
| parent | 69a137ff889f552b3ce58b861f3f0601c1818d6b (diff) | |
| download | tinycc-7f1ab9b1e111b9ea9261eec4b7c6fb0f42591eef.tar.gz tinycc-7f1ab9b1e111b9ea9261eec4b7c6fb0f42591eef.tar.bz2 | |
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
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -634,11 +634,9 @@ static int tcc_compile(TCCState *s1) preprocess_start(s1); tccgen_start(s1); - #ifdef INC_DEBUG printf("%s: **** new file\n", file->filename); #endif - ch = file->buf_ptr[0]; tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF; parse_flags = PARSE_FLAG_PREPROCESS | PARSE_FLAG_TOK_NUM | PARSE_FLAG_TOK_STR; @@ -1801,6 +1799,8 @@ reparse: s->dflag = 3; else if (*optarg == 'M') s->dflag = 7; + else if (*optarg == 'T') + s->do_test = argc; else if (isnum(*optarg)) g_debug = atoi(optarg); else |
