<div dir="ltr">/probably/ not worth worrying about changing the build system to disable/enable the flag - if there's pretty high confidence that you've built all the things and fixed all the warnings, it's OK to commit it and revert the patch if you missed. (I've committed and reverted patches (of significant/greater complexity) maybe 4-5 time due to deeper and deeper failures in buildbots - not ideal, to be sure, but not unheard of/impractical)<br><br>But also seems worth understanding which case the Clang warning is firing that the GCC warning is not - since the GCC warning is certainly caught and fixed by some buildbots or users, so I wouldn't expect the LLVM codebase to be too far from clean.</div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jun 10, 2017 at 11:07 AM Roman Lebedev via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Jun 10, 2017 at 8:47 PM, Mehdi AMINI <<a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I would first revert it *now* because the bot needs to stay green *now*.<br>
Reverted.<br>
<br>
> Then either the warnings can be fixed as a pre-commit to the added feature,<br>
> or if not possible the LLVM cmake config should first be updated to detect<br>
> and explicitly disable this warning.<br>
I think i'll attempt the following approach:<br>
1. build all the llvm components i can with clang with the warning<br>
2. fix all related warnings, commit after review<br>
3. temporarily add -wno-error=cast-qual<br>
4. recommit<br>
5. revert -wno-error=cast-qual and see if anything breaks<br>
6. either revert previous commit, and fix newly-catched issues, or all good.<br>
<br>
> --<br>
> Mehdi<br>
Roman.<br>
<br>
> 2017-06-10 10:40 GMT-07:00 Roman Lebedev via cfe-dev<br>
> <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>>:<br>
>><br>
>> Hi everyone.<br>
>><br>
>> In D33102, -Wcast-qual was implemented for C++,<br>
>> so naturally it now produces warnings for clang codebase.<br>
>><br>
>> That specific warning<br>
>> (cast from 'a' to 'b' must have all intermediate pointers const<br>
>> qualified to be safe)<br>
>> is clang-specific, i'm pretty sure gcc does not produce it.<br>
>><br>
>> To be perfectly honest, i did not thought about trying<br>
>> to build llvm/clang with the clang with that warning beforehand.<br>
>><br>
>> So here is the question: how to proceed?<br>
>> Revert? Disable that diagnostic? Etc?<br>
>><br>
>> Roman.<br>
>><br>
>> On Sat, Jun 10, 2017 at 8:28 PM,  <<a href="mailto:llvm.buildmaster@lab.llvm.org" target="_blank">llvm.buildmaster@lab.llvm.org</a>> wrote:<br>
>> > The Buildbot has detected a new failure on builder clang-with-lto-ubuntu<br>
>> > while building cfe.<br>
>> > Full details are available at:<br>
>> >  <a href="http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/3249" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/3249</a><br>
>> ><br>
>> > Buildbot URL: <a href="http://lab.llvm.org:8011/" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/</a><br>
>> ><br>
>> > Buildslave for this Build: ps4-buildslave1a<br>
>> ><br>
>> > Build Reason: scheduler<br>
>> > Build Source Stamp: [branch trunk] 305147<br>
>> > Blamelist: lebedevri<br>
>> ><br>
>> > BUILD FAILED: failed build-stage2-LLVMgold.so<br>
>> ><br>
>> > sincerely,<br>
>> >  -The Buildbot<br>
>> ><br>
>> ><br>
>> ><br>
>> _______________________________________________<br>
>> cfe-dev mailing list<br>
>> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
><br>
><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>