From: Joel Rosdahl Date: Mon, 11 Jul 2016 19:44:44 +0000 (+0200) Subject: Merge branch '3.2-maint' X-Git-Tag: v3.3~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab197641d99422b3bd544115008904c74fa21db8;p=thirdparty%2Fccache.git Merge branch '3.2-maint' * 3.2-maint: Doc and comment spelling fixes Fix some cppcheck style suggestions Update NEWS Work around preprocessor bugs in gcc version 6 --- ab197641d99422b3bd544115008904c74fa21db8 diff --cc ccache.c index 34f8352de,02beab0e5..b3d3cce6b --- a/ccache.c +++ b/ccache.c @@@ -827,8 -749,29 +827,30 @@@ process_preprocessed_file(struct mdfou && q[5] == ' ')) && (q == data || q[-1] == '\n')) { char *path; + bool system; + /* Workarounds for preprocessor linemarker bugs in GCC version 6 */ + if (q[2] == '3') { + if (str_startswith(q, "# 31 \"\"\n")) { + /* Bogus extra line with #31, after the regular #1: + Ignore the whole line, and continue parsing */ + while (q < end && *q != '\n') { + q++; + } + p = q; + continue; + } else if (str_startswith(q, "# 32 \"\" 2\n")) { + /* Bogus wrong line with #32, instead of regular #1: + Replace the line number with the usual one */ + hash_buffer(hash, p, q - p); + q += 1; + q[0] = '#'; + q[1] = ' '; + q[2] = '1'; + p = q; + } + } + while (q < end && *q != '"' && *q != '\n') { q++; }