<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Peter<div class=""><br class=""></div><div class="">Are you planning on using this in the LLVM/clang codebases?</div><div class=""><br class=""></div><div class="">I’m in favour of using it, but there was discussion a few years ago where some doubts were raised.  In particular (<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-July/052103.html" class="">http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-July/052103.html</a>):</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">"I don't really see that the tradeoff here is worthwhile.  It is possible that we have some fallthrough bugs, but the cost of sprinkling this macro everywhere doesn't seem like the right tradeoff.</div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">-Chris”</div></div></blockquote><div class=""><br class=""></div>It would be worth revising that discussion before making use of this throughout the codebase.<div class=""><br class=""></div><div class="">Cheers,</div><div class="">Pete<br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On May 19, 2015, at 7:44 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk" class="">peter@pcc.me.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Author: pcc<br class="">Date: Tue May 19 21:44:14 2015<br class="">New Revision: 237766<br class=""><br class="">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D237766-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=PprAJLFbKQAptwx2dtWT8dmFt8BeQcPSGXMTUuiPvPE&s=6kHVRBPvLTRaLbrNG9yfZRgYv7XYXHGbkulqhBaC3Gk&e=" class="">http://llvm.org/viewvc/llvm-project?rev=237766&view=rev</a><br class="">Log:<br class="">Support: Introduce LLVM_FALLTHROUGH macro.<br class=""><br class="">Modified:<br class="">    llvm/trunk/include/llvm/Support/Compiler.h<br class=""><br class="">Modified: llvm/trunk/include/llvm/Support/Compiler.h<br class="">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_include_llvm_Support_Compiler.h-3Frev-3D237766-26r1-3D237765-26r2-3D237766-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=PprAJLFbKQAptwx2dtWT8dmFt8BeQcPSGXMTUuiPvPE&s=i5YntnkbcUyqoGSIlJAO5SUxFIFaTXWGzqrx8zIblG0&e=" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=237766&r1=237765&r2=237766&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/include/llvm/Support/Compiler.h (original)<br class="">+++ llvm/trunk/include/llvm/Support/Compiler.h Tue May 19 21:44:14 2015<br class="">@@ -29,6 +29,10 @@<br class=""> # define __has_attribute(x) 0<br class=""> #endif<br class=""><br class="">+#ifndef __has_cpp_attribute<br class="">+# define __has_cpp_attribute(x) 0<br class="">+#endif<br class="">+<br class=""> #ifndef __has_builtin<br class=""> # define __has_builtin(x) 0<br class=""> #endif<br class="">@@ -401,4 +405,12 @@<br class=""> #define LLVM_THREAD_LOCAL<br class=""> #endif<br class=""><br class="">+/// \macro LLVM_FALLTHROUGH<br class="">+/// \brief Marks an empty statement preceding a deliberate switch fallthrough.<br class="">+#if __has_cpp_attribute(clang::fallthrough)<br class="">+#define LLVM_FALLTHROUGH [[clang::fallthrough]]<br class="">+#else<br class="">+#define LLVM_FALLTHROUGH<br class="">+#endif<br class="">+<br class=""> #endif<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></div></blockquote></div><br class=""></div></div></body></html>