<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="">You’re being pedantic, the compiler is being -Wpedantic, let’s just all be pedantic :-)<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2015, at 2:06 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Wed, Sep 23, 2015 at 11:32 AM, Chris Bieneman <</span><a href="mailto:beanz@apple.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">beanz@apple.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">> wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">On Sep 23, 2015, at 5:30 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:<br class=""><br class="">On Tue, Sep 22, 2015 at 8:01 PM, Chris Bieneman <<a href="mailto:beanz@apple.com" class="">beanz@apple.com</a>> wrote:<br class=""><br class=""><br class=""><br class="">On Sep 22, 2015, at 4:38 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:<br class=""><br class="">On Tue, Sep 22, 2015 at 7:35 PM, Chris Bieneman via llvm-commits<br class=""><<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""><br class="">Author: cbieneman<br class="">Date: Tue Sep 22 18:35:24 2015<br class="">New Revision: 248346<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=248346&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=248346&view=rev</a><br class="">Log:<br class="">[builtins] Fixing broken bot building on linux with -Werror<br class=""><br class="">Returning a void expression is bad.<br class=""><br class=""><br class="">Why is returning a void expression bad? Also, why do these require<br class="">return statements at all?<br class=""><br class=""><br class="">Returning a void expression is a warning on -Wpedantic<br class="">(<a href="http://lab.llvm.org" class="">lab.llvm.org</a>:8011/builders/sanitizer-x86_64-linux/builds/20392).<br class=""><br class=""><br class="">Good to know, thanks!<br class=""><br class="">The return itself isn't needed, but is common C convention.<br class=""><br class=""><br class="">This is the first I've heard that this is a C convention (but I'm not<br class="">claiming that it isn't). It doesn't appear to be one we adhere to with<br class="">any consistency -- I did a quick scan of other builtins (see<br class="">atomic_signal_fence.c and atomic_thread_fence.c) and they elide the<br class="">return. Since it's not needed anyway, I think it'd be good to remove.<br class=""><br class=""><br class="">Revised r248385.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Thank you! I will go be pedantic elsewhere now. ;-)</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">~Aaron</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">-Chris<br class=""><br class=""><br class="">~Aaron<br class=""><br class=""><br class="">-Chris<br class=""><br class=""><br class="">~Aaron<br class=""><br class=""><br class="">Modified:<br class=""> compiler-rt/trunk/lib/builtins/atomic_flag_clear.c<br class=""> compiler-rt/trunk/lib/builtins/atomic_flag_clear_explicit.c<br class=""><br class="">Modified: compiler-rt/trunk/lib/builtins/atomic_flag_clear.c<br class="">URL:<br class=""><a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/atomic_flag_clear.c?rev=248346&r1=248345&r2=248346&view=diff" class="">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/atomic_flag_clear.c?rev=248346&r1=248345&r2=248346&view=diff</a><br class="">==============================================================================<br class="">--- compiler-rt/trunk/lib/builtins/atomic_flag_clear.c (original)<br class="">+++ compiler-rt/trunk/lib/builtins/atomic_flag_clear.c Tue Sep 22 18:35:24<br class="">2015<br class="">@@ -21,7 +21,8 @@<br class="">#include <stdatomic.h><br class="">#undef atomic_flag_clear<br class="">void atomic_flag_clear(volatile atomic_flag *object) {<br class="">-  return __c11_atomic_store(&(object)->_Value, 0, __ATOMIC_SEQ_CST);<br class="">+  __c11_atomic_store(&(object)->_Value, 0, __ATOMIC_SEQ_CST);<br class="">+  return;<br class="">}<br class=""><br class="">#endif<br class=""><br class="">Modified: compiler-rt/trunk/lib/builtins/atomic_flag_clear_explicit.c<br class="">URL:<br class="">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/atomic_flag_clear_explicit.c?rev=248346&r1=248345&r2=248346&view=diff<br class="">==============================================================================<br class="">--- compiler-rt/trunk/lib/builtins/atomic_flag_clear_explicit.c (original)<br class="">+++ compiler-rt/trunk/lib/builtins/atomic_flag_clear_explicit.c Tue Sep 22<br class="">18:35:24 2015<br class="">@@ -22,7 +22,8 @@<br class="">#undef atomic_flag_clear_explicit<br class="">void atomic_flag_clear_explicit(volatile atomic_flag *object,<br class="">                              memory_order order) {<br class="">-  return __c11_atomic_store(&(object)->_Value, 0, order);<br class="">+  __c11_atomic_store(&(object)->_Value, 0, order);<br class="">+  return;<br class="">}<br class=""><br class="">#endif<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class="">llvm-commits@lists.llvm.org<br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</blockquote></div></blockquote></div><br class=""></div></body></html>