From d8fdd380f39aa413886c61c2e3624ba3b4582dc0 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 9 Jul 2017 04:30:36 +0200 Subject: 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. --- tests/pp/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/pp/Makefile') diff --git a/tests/pp/Makefile b/tests/pp/Makefile index ba75bbc..21c9969 100644 --- a/tests/pp/Makefile +++ b/tests/pp/Makefile @@ -31,10 +31,7 @@ FILTER = 2>&1 | sed 's,$(SRC)/,,g' # automatically generate .expect files with gcc: %.expect: # %.c - gcc -E -P $< >$*.expect 2>&1 - -%.expect: # %.S - gcc -E -P $< >$*.expect 2>&1 + gcc -E -P $*.[cS] >$*.expect 2>&1 # tell make not to delete .PRECIOUS: %.expect -- cgit v1.3.1