diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2018-01-11 20:51:38 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2018-01-11 21:05:14 +0100 |
commit | c9d9966c7dedfb00ac139170c6d1cce7d198ca31 (patch) | |
tree | 0e31962f5754ad57ec405c0bbbd35c77519a9654 /ccache.c | |
parent | fac1597a7abbac7046926bc75dadcfa275aec01a (diff) | |
download | ccache-c9d9966c7dedfb00ac139170c6d1cce7d198ca31.tar.gz |
Don't skip compiler argument following AFFECTS_CPP without TAKES_ARG
Bug found by Mike Gelfand.
Fixes #203.
Diffstat (limited to 'ccache.c')
-rw-r--r-- | ccache.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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])) { |