<div dir="ltr">Hi Renato,<br><br>I disagree with you about there being consensus in the UNIX world about this. Taken from the manpage of getopt_long:<div><br></div><div>> <span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal">A long option may take a parameter, of the form </span><b style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal">--arg=param</b><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal"> or </span><b style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal">--arg param</b><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal">.</span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal"><br></span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal">if getopt(3) accepts it, there doesn't seem to be consensus that it should be rejected. I agree with Gabor and Richard (without having conferred beforehand) that it's mega confusing and has been a pain point for a while.</span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal"><br></span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal">Cheers,</span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal"><br></span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:medium;line-height:normal">James</span></div></div><br><div class="gmail_quote">On Thu Feb 19 2015 at 1:32:01 PM Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In <a href="http://reviews.llvm.org/D7730#126353" target="_blank">http://reviews.llvm.org/D7730#<u></u>126353</a>, @richard.barton.arm wrote:<br>
<br>
> Point taken, but there are counterexamples. A very quick play in my terminal shows that diff accepts the option --ifdef with either a space or = separating the argument. Same for grep and --exclude, emacs and --cursor-color.<br>
<br>
<br>
If the others are not following the "standard", let's not break what is.<br>
<br>
> -mcpu=, -fdiagnostics-color= are both valid.<br>
<br>
<br>
These are GCC's fault, there isn't much we can do.<br>
<br>
> --mhwdiv is available as --mhwdiv=arm, --mhwdiv arm and -mhwdiv=arm, but not as -mhwdiv arm!<br>
<br>
<br>
I'd remove the non-conforming options. How does GCC behave in those cases?<br>
<br>
> "Need" is too strong here. Our concern is out-of-box usability to people unfamiliar with the tool. If a user takes clang and passes --target arm-none-eabi or -target=arm-none-eabi they get error messages like:<br>
<br>
><br>
<br>
> clang-3.7: error: unsupported option '--target'<br>
<br>
>  clang-3.7: error: no such file or directory: 'arm-none-eabi'<br>
<br>
><br>
<br>
> or<br>
<br>
><br>
<br>
> clang-3.7: error: unknown argument: '-target=arm-none-eabi'<br>
<br>
><br>
<br>
> which is pretty poor.<br>
<br>
<br>
I agree, but we should fix the error messages, and not add more complexity. We already have infrastructure in Clang to suggest the appropriate syntax, we should use that instead.<br>
<br>
> It seems to me that given clang is not consistent with its application of these unix rules and that there are no gcc compatibility issues to consider, this would be a simple way to improve the situation.<br>
<br>
<br>
We don't "have" to be consistent to anything, we just *want* to be. The ones we chose to follow on Unix systems are the Unix and GCC standards, where it fits. My view is that everything else that is neither, should fit into one or the other.<br>
<br>
I certainly don't speak for everyone, but for this specific case, I think we should fix the diagnostics on -target, instead of accepting more options.<br>
<br>
cheers,<br>
--renato<br>
<br>
<br>
REPOSITORY<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D7730" target="_blank">http://reviews.llvm.org/D7730</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/cfe-commits</a><br>
</blockquote></div>