Dimitry Andric
2014-Jul-05 13:07 UTC
[HEADS-UP] Problem with clang in 9-stable [was: r268244 (stable/9) seems to break "sysctl hw.ncpu"]
On 05 Jul 2014, at 14:49, David Chisnall <theraven at theravensnest.org> wrote:> On 4 Jul 2014, at 19:18, David Wolfskill <david at catwhisker.org> wrote: > >> clang -O2 -pipe -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -o sysctl sysctl.o > > This compile line is turning off a lot of warnings. In particular, -Wno-uninitialized and -Wno-parentheses-equality are likely to hide warnings that refer to real errors.Interestingly, -Wno-uninitialized has been in bsd.sys.mk since r76861, and the accompanying comment ("XXX Delete -Wuninitialized by default for now -- the compiler doesn't always get it right") has never been changed. :-) It is probably time to re-enable that warning after 13 years, at least. I'm not so sure about -Wno-parentheses-equality, because that might give quite a few false positives, especially in old, contributed code. -Dimitry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 203 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20140705/20931958/attachment.sig>
David Chisnall
2014-Jul-05 13:10 UTC
[HEADS-UP] Problem with clang in 9-stable [was: r268244 (stable/9) seems to break "sysctl hw.ncpu"]
On 5 Jul 2014, at 14:07, Dimitry Andric <dim at FreeBSD.org> wrote:> Interestingly, -Wno-uninitialized has been in bsd.sys.mk since r76861, > and the accompanying comment ("XXX Delete -Wuninitialized by default for > now -- the compiler doesn't always get it right") has never been > changed. :-) > > It is probably time to re-enable that warning after 13 years, at least.It probably only wants enabling for clang. GCC (at least, GCC 4.2.1) performs this analysis based on analyses run by the optimisers and so the warnings are dependent on optimisation level. David
On 07/05/14 15:10, David Chisnall wrote:> On 5 Jul 2014, at 14:07, Dimitry Andric <dim@FreeBSD.org> wrote: > >> Interestingly, -Wno-uninitialized has been in bsd.sys.mk since r76861, >> and the accompanying comment ("XXX Delete -Wuninitialized by default for >> now -- the compiler doesn't always get it right") has never been >> changed. :-) >> >> It is probably time to re-enable that warning after 13 years, at least. > > It probably only wants enabling for clang. GCC (at least, GCC 4.2.1) performs this analysis based on analyses run by the optimisers and so the warnings are dependent on optimisation level. > > DavidHi, Is someone working on this? --HPS _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"