<html><head></head><body><div class="gmail_quote">Le 25 juillet 2017 12:27:38 GMT+03:00, Steve Lhomme <robux4@gmail.com> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On Tue, Jul 25, 2017 at 10:37 AM, Rémi Denis-Courmont <remi@remlab.net> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Le 25 juillet 2017 10:06:00 GMT+03:00, Steve Lhomme <robux4@gmail.com> a<br /> écrit :<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><br /> On Tue, Jul 25, 2017 at 8:07 AM, Tristan Matthews <tmatth@videolan.org><br /> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><br />  On Tue, Jul 25, 2017 at 1:34 AM, Steve Lhomme <robux4@gmail.com> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><br />  On Mon, Jul 24, 2017 at 6:32 PM, Rémi Denis-Courmont <git@videolan.org><br /> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><br />  vlc | branch: master | Rémi Denis-Courmont <remi@remlab.net> | Mon Jul<br /> 24 19:19:00 2017 +0300| [5efc79cf91cfb9b151e7e47de3a4f589116293df] |<br /> committer: Rémi Denis-Courmont<br /><br />  imem: fix warning<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><br /> <a href="http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5efc79cf91cfb9b151e7e47de3a4f589116293df">http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5efc79cf91cfb9b151e7e47de3a4f589116293df</a><br /></blockquote><br />  ---<br /><br />   modules/access/imem.c | 1 +<br />   1 file changed, 1 insertion(+)<br /><br />  diff --git a/modules/access/imem.c b/modules/access/imem.c<br />  index 08426eafde..09a74f1c15 100644<br />  --- a/modules/access/imem.c<br />  +++ b/modules/access/imem.c<br />  @@ -403,6 +403,7 @@ static inline int GetCategory(vlc_object_t<br /> *object)<br />           return SPU_ES;<br />       default:<br />           msg_Err(object, "Invalid ES category");<br />  +        /* fall through */<br /></blockquote><br /><br />  How does adding a comment "fix a warning" ?<br /></blockquote><br /><br />  See e.g., "-Wimplicit-fallthrough=3" in gcc-7. [1]<br /></blockquote><br /><br /> So now rather than telling the compiler explicitly what we want, we<br /> let it guesstimate via comments ? That's very odd.<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;">  Best,<br />  -t<br /><br />  [1] <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html</a><br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;">       case 4:<br />           return UNKNOWN_ES;<br />       }<br /><br /><hr /><br /><br />  vlc-commits mailing list<br />  vlc-commits@videolan.org<br />  <a href="https://mailman.videolan.org/listinfo/vlc-commits">https://mailman.videolan.org/listinfo/vlc-commits</a><br /></blockquote><br /><hr /><br /><br />  vlc-devel mailing list<br />  To unsubscribe or modify your subscription options:<br />  <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br /></blockquote><br /><hr /><br /><br />  vlc-devel mailing list<br />  To unsubscribe or modify your subscription options:<br />  <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br /></blockquote><br /><hr /><br /><br /> vlc-devel mailing list<br /> To unsubscribe or modify your subscription options:<br /> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br /></blockquote><br /><br /> This is a consequence of the ISO C++ push for annotating fall-through<br /> explicitly. GCC now wants it also for existing C and C++.<br /></blockquote><br />There is __attribute__((fallthrough)) for that. Other compilers might<br />have other ways. But unlikely to look at comments.<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> --<br /> Rémi Denis-Courmont<br /> Typed on an inconvenient virtual keyboard<br /><br /><hr /><br /> vlc-devel mailing list<br /> To unsubscribe or modify your subscription options:<br /> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br /></blockquote><hr /><br />vlc-devel mailing list<br />To unsubscribe or modify your subscription options:<br /><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br clear="all">Attribute fall through is GCC-specific. Comments compile anywhere. Furthermore the commentd reflect an old defacto standard and are backward compatible with many preexistent instances that our code base had before GCC 7.<br>
<br>
ISO C (not ++) probably won't have a proper way to deal with this anytime soon, so that's that.<br>
-- <br>
Rémi Denis-Courmont<br>
Typed on an inconvenient virtual keyboard</body></html>