From owner-freebsd-hackers Wed Apr 24 13:51:54 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA22821 for hackers-outgoing; Wed, 24 Apr 1996 13:51:54 -0700 (PDT) Received: from palmer.demon.co.uk (palmer.demon.co.uk [158.152.50.150]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id NAA22809 for ; Wed, 24 Apr 1996 13:51:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by palmer.demon.co.uk (sendmail/PALMER-1) with SMTP id VAA03853 ; Wed, 24 Apr 1996 21:43:48 +0100 (BST) To: Michael Smith cc: jmacd@CS.Berkeley.EDU (Josh MacDonald), bde@zeta.org.au, freebsd-hackers@FreeBSD.ORG From: "Gary Palmer" Subject: Re: GNU binutils port In-reply-to: Your message of "Wed, 24 Apr 1996 21:27:21 +0930." <199604241157.VAA19097@genesis.atrad.adelaide.edu.au> Date: Wed, 24 Apr 1996 21:43:47 +0100 Message-ID: <3851.830378627@palmer.demon.co.uk> Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Michael Smith wrote in message ID <199604241157.VAA19097@genesis.atrad.adelaide.edu.au>: > Josh MacDonald stands accused of saying: > > Oh dear.... I can't beleive you're saying this, "They are only warnings". > > > > To me, it has, "My code sucks and I don't care." written all over > > it if you don't fix things so that they compile with no warnings > > and -Wall. Perhaps kernel code is a bit different, but with 4700 > > warnings, I'd be little scared. I wouldn't be. I've got a development tree with over half those warnings fixed, and none of them (well, okay, one) could have done anything nasty. And from a quick glance through, most of the rest are printf() formatting warnings, as GCC can't understand some of the special printf contructs available in the kernel. > gcc -Wall is _pedantic_. Consider how many of the above are > "Consider parentheses around assignment used as truth value", or > "Integer used as pointer without a cast" (for use of '0' as a [legitimate] > substitute for NULL. Which is why I was using -Wall -Wno-parenthesis (or something, I can't find my makefile now) to shut up that warning. It bugs the hell out of me. Another thing: AFAIR, GCC 2.6.3 does NOT meet the ANSI standards for compiler warnings & errors. I could be wrong, but if someone gets a commercial C compiler which DOES, and throws our kernel sources at it, I'll bet there'll be several more warnings (and even an error or two), even after removing all the GCC/GAS/GLD dependancy that we have (and I don't like having). Gary -- Gary Palmer FreeBSD Core Team Member FreeBSD - Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info.