Hi,<div><br><div class="gmail_quote">On Sun, May 27, 2012 at 1:55 PM, Matthieu Monrocq <span dir="ltr"><<a href="mailto:matthieu.monrocq@gmail.com" target="_blank">matthieu.monrocq@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 class="gmail_quote"><div>One question: in the proposed macro, why not put the the `;` in the macro since it will be mandatory anyway ?<br></div></div></blockquote><div> Keeping semicolon out of macro is intentional. That way macro usage looks like a statement (which it is).</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>Also, it might be easier to just do:<br><br>#if defined(__has_feature) and __has_feature(cxx_attributes)<br>

#  define FALLTHROUGH [[clang::fallthrough]];<br>#else<br>#  define FALLTHROUGH while(0) {}<br>#endif</div></div></blockquote><div>Unfortunately, it will not work at least on gcc, because it tries to parse the whole #if condition at once and emits an error on __has_feature(...).</div>
<div><br></div></div>-- <br>
<div>Best regards,</div><div>Alexander Kornienko</div></div>