Re: [PATCH 2/3] combine-diff: suppress a clang warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 07, 2013 at 01:12:59PM +0900, Miles Bader wrote:
> John Keeping <john@xxxxxxxxxxxxx> writes:
> > I generally like to get rid of the pointless warnings so that the useful
> > ones can't hide in the noise.  Perhaps "CFLAGS += -Wno-string-plus-int"
> > would be better for this particular warning, but when there's only one
> > bit of code that triggers it, tweaking that seemed simpler.
> 
> An even better approach would be to file a bug against clang ... it
> really is a very ill-considered warning -- PTR + OFFS is not just
> valid C, it's _idiomatic_ in C for getting interior pointers into
> arrays -- and such a warning should never be enabled by default, or by
> any standard warning options.

It doesn't warn of PTR + OFFS, only STRING_LITERAL + OFFS.  I agree that
it's not a particularly useful warning but it was clearly introduced
intentionally and appears to find real bugs [1] so I don't intend to
argue about it with the Clang developers.

[1] http://article.gmane.org/gmane.comp.compilers.clang.scm/47203


John
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]