<div dir="ltr">From a brief look at <a href="http://depfile_parser.in.cc">depfile_parser.in.cc</a>, it looks like Ninja does not correctly handle GCC's current behavior, and Paul's patch will actually make it "work". Clearly includes with `#` characters in them don't happen in practice.<div><br></div><div>Ninja's depfile_parser.cc tries to express the escaping rules as "backslash escapes certain characters", which is not the reality. Make's craziness is such that you cannot tell in isolation whether the backslashes in a substring `foo\\` need to be escaped or not without looking at the characters following that substring.<br><div><br></div><div>-- Sean Silva</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 4:36 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div class="gmail_extra"><div class="gmail_quote">On Fri, May 8, 2015 at 4:01 PM, Paul Robinson <span dir="ltr"><<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank">Paul_Robinson@playstation.sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>In <a href="http://reviews.llvm.org/D9208#169446" target="_blank">http://reviews.llvm.org/D9208#169446</a>, @thakis wrote:<br>
<br>
> Does gcc intend to fix this soon? Isn't being compatible with gcc important<br>
>  than the other things?<br>
<br>
<br>
</span>If gcc emitted an incorrect relocation, would you argue that it's important to be compatible with gcc?  Even if you could not point to any linker that handled that buggy relocation in a reasonable way?<br></blockquote></div><br></div></span><div class="gmail_extra">'course not, but that's not the case here. If a program (say, ninja) tries to be compatible with gnu make's depfile parsing, it would previously convert "\ " to a space from what I understand. Now it's going to get "\\\ " and think that that's "\ ". So this is breaking backwards compat of clang with itself.</div></div>
</blockquote></div><br></div>