|
Message-ID: <20130710022528.GV29800@brightrain.aerifal.cx> Date: Tue, 9 Jul 2013 22:25:28 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: endian.h warnings On Wed, Jul 10, 2013 at 02:21:58PM +1200, Andre Renaud wrote: > Hi, > When using musl with -Wparentheses enabled, I get the following warnings: > .../include/endian.h: In function '__bswap32': > .../include/endian.h:32:2: warning: suggest parentheses around > arithmetic in operand of '|' [-Wparentheses] > .../include/endian.h:32:2: warning: suggest parentheses around > arithmetic in operand of '|' [-Wparentheses] > .../include/endian.h: In function '__bswap64': > .../include/endian.h:37:2: warning: suggest parentheses around '+' > inside '<<' [-Wparentheses] > > I appreciate that these aren't bugs, and are just gcc being over > enthusiastic in it's warnings (which I've asked it to be on the > command line), however would it be worth sticking some parentheses > into the code simply to avoid this kind of noise being visible for > users? I really don't understand why gcc is generating warnings for these; I thought it automatically suppressed warnings for system include directories, and even macro expansion text generated from macros defined in these headers. If that suppression is not working correctly, maybe we should work around these warnings. I agree it's problematic for users to get spammed with irrelevant warnings that decrease the signal to noise ratio of the compiler's warning generation. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.