From: Joel Rosdahl Date: Thu, 11 Jan 2018 19:51:38 +0000 (+0100) Subject: Don't skip compiler argument following AFFECTS_CPP without TAKES_ARG X-Git-Tag: v3.3.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9d9966c7dedfb00ac139170c6d1cce7d198ca31;p=thirdparty%2Fccache.git Don't skip compiler argument following AFFECTS_CPP without TAKES_ARG Bug found by Mike Gelfand. Fixes #203. --- diff --git a/ccache.c b/ccache.c index e30bb50f1..64b25def7 100644 --- a/ccache.c +++ b/ccache.c @@ -1673,7 +1673,9 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode) if (!direct_mode && !output_is_precompiled_header && !using_precompiled_header) { if (compopt_affects_cpp(args->argv[i])) { - i++; + if (compopt_takes_arg(args->argv[i])) { + i++; + } continue; } if (compopt_short(compopt_affects_cpp, args->argv[i])) {