From 80fe9787c616b723be869f25e713ae01746a2384 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 14 Nov 2010 11:00:04 +0100 Subject: [PATCH] Correctly handle "#line N" (without path) directive for AIX's preprocessor --- ccache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ccache.c b/ccache.c index 6022dd31d..ee6c5ff73 100644 --- a/ccache.c +++ b/ccache.c @@ -460,9 +460,13 @@ process_preprocessed_file(struct mdfour *hash, const char *path) && (q == data || q[-1] == '\n')) { char *path; - while (q < end && *q != '"') { + while (q < end && *q != '"' && *q != '\n') { q++; } + if (q < end && *q == '\n') { + /* A newline before the quotation mark -> no match. */ + continue; + } q++; if (q >= end) { cc_log("Failed to parse included file path"); -- 2.47.2