<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 5:57 PM, Robinson, Paul <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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div><span class="">
<p class="MsoNormal" style="margin-left:0.5in">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 "\ ".<span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><a name="14d363012a24af9b__MailEndCompose"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></a></p>
</span><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">You're mixing things up.  #include "\ " would be converted by gcc to "\\ " (because it escapes the space but not the backslash) which would be de-escaped by
 GNU Make as "\" followed by a space delimiter.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Now Clang will give it "\\\ " which will be handled as "\ " which is correct.</span></p></div></div></blockquote><div><br></div><div>Is this right? GCC and the current patch coincide on the handling of `\ `. The only deviation is in the `#` case, no?<br></div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">(Remember that the string you hand to #include is NOT a normal C string; it has no escaping in it.)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div style="border-style:none none none solid;border-left-color:blue;border-left-width:1.5pt;padding:0in 0in 0in 4pt">
<div>
<div style="border-style:solid none none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:Tahoma,sans-serif">From:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif"> <a href="mailto:cfe-commits-bounces@cs.uiuc.edu" target="_blank">cfe-commits-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:cfe-commits-bounces@cs.uiuc.edu" target="_blank">cfe-commits-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Nico Weber<br>
<b>Sent:</b> Friday, May 08, 2015 4:36 PM<br>
<b>To:</b> <a href="mailto:reviews%2BD9208%2Bpublic%2B0ac91376ffbd3e34@reviews.llvm.org" target="_blank">reviews+D9208+public+0ac91376ffbd3e34@reviews.llvm.org</a><br>
<b>Cc:</b> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><span class=""><br>
<b>Subject:</b> Re: [PATCH] Fix dependency file escaping<u></u><u></u></span></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">On Fri, May 8, 2015 at 4:01 PM, Paul Robinson <<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank">Paul_Robinson@playstation.sony.com</a>> wrote:<u></u><u></u></p><div><div class="h5">
<p class="MsoNormal">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>
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?<u></u><u></u></p>
</div></div></div>
<p class="MsoNormal"><u></u> <u></u></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal">'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.<u></u><u></u></p>
</div>
</div></div></div>
</div>
</div>
</div>

<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>