<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 8:29 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":20a" class="a3s" style="overflow:hidden">My preference is also for the first option. The files we reject now<br>
with -S are the ones we used to reject with -c. We just ask for "-S<br>
-no-integrated-as" to be used when a file contains invalid inline<br>
assembly.</div></blockquote><div><br></div><div>Emphatic agreement.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":20a" class="a3s" style="overflow:hidden">
If that is too strict to work in practice, I think the<br>
alternatives I would prefer would be<br>
<br>
* Have the driver pass -no-integrated-as when given -S but not<br>
-integrated-as. That is, -no-integrated-as is always the default for<br>
-S in clang. This has the big advantage that parsing assembly is still<br>
just a on/off switch.<br>
* Have a second TargetOption: StrictIntegratedAS. Have the driver set<br>
that based on -S/-c and -integrated-as/-no-integrated-as. With this<br>
option we downgrade assembly parsing errors to warnings and fallback<br>
to EmitRawText, but without ever calling hasRawTextSupport. I believe<br>
this is equivalent to Renato's proposal.<br>
<br>
Even if we decide to go with the option of downgrading errors to<br>
warnings, we should probably still do that in a second step and first<br>
just have the driver disable the integrated assembler with -S for now.</div></blockquote></div><br>I don't much like any of these options. I actually have strong objections to essentially all of the suggestions outside of the current state except for passing comments through. I think passing comments through seems obvious and correct. I also don't think it makes any difference for hacks like the one being used by the linux kernel, so while it seems fine in general, it doesn't seem important for this use case.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I think the simple reality is that if you want to use inline assembly to dump raw text around C code to an assembly file generated with -S, turn off the integrated assembler entirely. You clearly don't want it.</div>
</div>