From owner-freebsd-arch@FreeBSD.ORG Fri Aug 5 16:22:34 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECB8D16A41F; Fri, 5 Aug 2005 16:22:34 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from sccrmhc14.comcast.net (sccrmhc14.comcast.net [204.127.202.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id E35BB43D46; Fri, 5 Aug 2005 16:22:33 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-66-30-115-133.hsd1.ma.comcast.net ([66.30.115.133]) by comcast.net (sccrmhc14) with ESMTP id <2005080516223201400d1ei4e>; Fri, 5 Aug 2005 16:22:32 +0000 Received: from c-66-30-115-133.hsd1.ma.comcast.net (localhost.127.in-addr.arpa [127.0.0.1]) by c-66-30-115-133.hsd1.ma.comcast.net (8.13.4/8.13.1) with ESMTP id j75GMYU4097344; Fri, 5 Aug 2005 12:22:34 -0400 (EDT) (envelope-from rodrigc@c-66-30-115-133.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-66-30-115-133.hsd1.ma.comcast.net (8.13.4/8.13.1/Submit) id j75GMYUo097343; Fri, 5 Aug 2005 12:22:34 -0400 (EDT) (envelope-from rodrigc) Date: Fri, 5 Aug 2005 12:22:34 -0400 From: Craig Rodrigues To: John Baldwin Message-ID: <20050805162234.GA96585@crodrigues.org> References: <20050803200143.GA70735@crodrigues.org> <200508051049.26158.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508051049.26158.jhb@FreeBSD.org> User-Agent: Mutt/1.5.9i Cc: freebsd-arch@FreeBSD.org Subject: Re: [RFC] Kernel patches for compilation with gcc 4.0 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2005 16:22:35 -0000 On Fri, Aug 05, 2005 at 10:49:25AM -0400, John Baldwin wrote: > You need to get the acpi_wakeup changes reviewed. Not saving the gdt and idt > descriptors across suspend/resume would be very disastrous. I sent a separate e-mail to njl@ and marks@ about the acpi_wakeup patch. The patch was suggested to me by kan@. He suggested that I remove the static variables which clashed with the global variables of the same name, and to remove asm calls which saved them in acpi_wakeup.c > I think it is a mistake to make static structures like th0 non-static to > workaround -Wredundant-decls. Get gcc to fix -Wredundant-decls instead if at > all possible. kern_tc.c is an example of this type of change. rtsock.c > probably is, too. This behavior in GCC seems to have been there for a long time (I can reproduce it with 2.95, 3.4, and 4.0). I can ask the GCC people about this. The other alternative is to remove -Wredundant-decls from the kernel Makefiles. I asked why we use -Wredundant-decls, because it seems to warn against legal C code: http://lists.freebsd.org/pipermail/freebsd-current/2005-August/053708.html I'm not enough of a C guru to know.... > Why did you move MALLOC_DECLARE out of in6_var.h? Because I got this compiler error in in.c : gcc40 -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -std=c99 -g -nostdinc -I. -I../../.. -I../../../contrib/dev/acpica -I../../../contrib/altq -I../../../contrib/ipfilter -I../../../contrib/pf -I../../../contrib/dev/ath -I../../../contrib/dev/ath/freebsd -I../../../contrib/ngatm -I../../../dev/twa -D_KERNEL -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror ../../../netinet/in.c ../../../netinet/in.c:54: error: static declaration of 'M_IPMADDR' follows non-static declaration ../../../netinet6/in6_var.h:479: error: previous declaration of 'M_IPMADDR' was here *** Error code 1 -- Craig Rodrigues rodrigc@crodrigues.org