diff options
| author | Michael Matz <matz@suse.de> | 2017-07-09 04:30:36 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2017-07-09 04:38:56 +0200 |
| commit | d8fdd380f39aa413886c61c2e3624ba3b4582dc0 (patch) | |
| tree | 8f17b9c9e34ae77aafd5ce37fee68f50a6523dcb /tests/pp/19.expect | |
| parent | 16d3dbf2d087c92810d8d8354822a5345978e32c (diff) | |
| download | tinycc-d8fdd380f39aa413886c61c2e3624ba3b4582dc0.tar.gz tinycc-d8fdd380f39aa413886c61c2e3624ba3b4582dc0.tar.bz2 | |
tccpp: Fix corner case
See added testcase 19.c from a bug report. The problem is reading outside
the arguments buffers, even though we aren't allowed to. The single
can_read_stream variable is not enough, sometimes we need to be able
to pop into outer contexts but not into arbitrarily outside contexts.
The trick is to terminate argument tokens with a EOF (and not just with
0 that makes us pop contexts), and deal with that in the few places
we have to,
This enables some cleanups of the can_read_stream variable use.
Diffstat (limited to 'tests/pp/19.expect')
| -rw-r--r-- | tests/pp/19.expect | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/pp/19.expect b/tests/pp/19.expect new file mode 100644 index 0000000..08c0858 --- /dev/null +++ b/tests/pp/19.expect @@ -0,0 +1,14 @@ +X92 M_IFI_1 +X93 KO +X94 KO +X95 a +X96 M_IFI_1 +X97 ok +X98 (1)(ok, nok) +X99 ok +X1 ok +X2 1 +X3 ok +X4 1 +X5 nok +X6 ok |
