From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10233 Path: news.gmane.org!not-for-mail From: Luca Barbato Newsgroups: gmane.linux.lib.musl.general Subject: Re: Fix warnings when build with clang Date: Mon, 27 Jun 2016 19:41:49 +0200 Message-ID: <409e13bc-9e0c-9db6-977b-1a90b18d278e@gentoo.org> References: <20160625093707.GA19691@port70.net> <36ad2a0f7443ff7e95b7e927b49a2a87@codeaurora.org> <20160627172159.GH10893@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1467049340 2657 80.91.229.3 (27 Jun 2016 17:42:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 17:42:20 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10246-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 27 19:42:10 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bHaXx-0000iI-Og for gllmg-musl@m.gmane.org; Mon, 27 Jun 2016 19:42:09 +0200 Original-Received: (qmail 32072 invoked by uid 550); 27 Jun 2016 17:42:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 32054 invoked from network); 27 Jun 2016 17:42:06 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2 In-Reply-To: <20160627172159.GH10893@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:10233 Archived-At: On 27/06/16 19:21, Rich Felker wrote: > On Mon, Jun 27, 2016 at 10:01:52AM -0700, weimingz@codeaurora.org wrote: >> On 2016-06-25 02:37, Szabolcs Nagy wrote: >>> * Zhao, Weiming [2016-06-24 17:18:23 -0700]: >>>> Clang gives warnings about the missing parentheses for bitwise ops. >>>> >>>> It's not functional but just code readability. >>>> >>>> musl-m3/include/endian.h:32:25: warning: '&' within '|' >>>> [-Wbitwise-op-parentheses] >>>> return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; >>>> ~ ~~~~~~^~~~~~~ >>> >>> if clang warns about system headers that's a clang bug. >> >> The endian.h is a musl file. > > Right, which is why it's a system header. I'm not sure there is a simple way to know what's a system header and what is not, beside keeping a list. And even in that case I'm not so sure the compiler should hide warnings (no matter how fringe this actual warning is). lu