<div dir="ltr"><div><div><div>Let me summarize what we have.<br><br></div>The old trick with "switch (0) case 0: default:" does not work with gcc-7.1 any more. The same is for the one-time-for-loop. And, unless I'm missing something, we do not have other ideas which may work.<br><br></div>I have filed an issue <a href="https://github.com/google/googletest/issues/1119">https://github.com/google/googletest/issues/1119</a>.<br><br></div>In the mean time, these are the only warnings which block me from having the gcc-7.1 bot in the production master and I would like to get this resolved as soon as possible.<br><div><div><br></div><div>Unless anyone has a better idea, I'm going to add the explicit braces in those 37 places and be done with this.<br><br></div><div>Thanks<br><br></div><div>Galina<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 3, 2017 at 10:25 PM, Galina Kistanova <span dir="ltr"><<a href="mailto:gkistanova@gmail.com" target="_blank">gkistanova@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 dir="ltr"><div>Unfortunately, a do { ... } while (0) wrapper wouldn't work either. Because of usages like this:<br><br>ASSERT_EQ(&TestOption, Retrieved) << "Retrieved wrong option.";<br><br></div>Galina<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 2:41 PM, Joerg Sonnenberger via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Sat, May 27, 2017 at 10:30:54PM -0700, Craig Topper via llvm-commits wrote:<br>
> EXPECT_STREQ should already be using this as far as I can tell.<br>
<br>
</span>GTEST_ASSERT_ should get a do { ... } while (0) wrapper. That's much<br>
better than the switch statement it is currently trying to use.<br>
<br>
Joerg<br>
<div class="m_9107012896934092926HOEnZb"><div class="m_9107012896934092926h5">______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>