On 2013-05-02 12:06, Davide Italiano wrote:
On Thu, May 2, 2013 at 8:43 AM, Andrey Chernov <a...@freebsd.org> wrote:
cc1: warnings being treated as errors
/usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_core.c: In function 
'iap_allocate_pmc':
/usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_core.c:1935: warning: 'map' 
may be used uninitialized in this function
...
You can find a patch attached at the end of this mail that should fix
the problem.

Hm, the warning seems to be bogus.  Newer versions of gcc (I tried 4.7.3
and 4.8.1) do not warn about 'map' (though they both warn about another
variable, which is set, but not used.)


More generally speaking, why are you building -CURRENT using GCC while
the default compiler has been clang since November 2012?
I understand we cannot completely get rid of GCC as long as
Tier-2/Tier-3 arch haven't full support for clang and friends, OTOH, I
see clang default on amd64 so I guess at some point we should declare
GCC not officially supported anymore. Putting the additional burden of
testing on the committer because two compilers are supported at the
same time doesn't scale really well, at least according to me.

Some people still prefer gcc, and while this warning is a bit annoying,
I see no problem in putting in a workaround.  Using gcc for arches which
default to clang will most likely have to be supported for quite some
time.

Also, if the external toolchain support ever comes off the ground, it
will probably become necessary to suppress certain warnings on an
individual basis; for example, with recent gcc versions, there are quite
a large number of "variable x set but not used" warnings, which are not
very useful, most of the time.
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to