Date: Fri, 5 Aug 2005 12:22:34 -0400 From: Craig Rodrigues <rodrigc@crodrigues.org> To: John Baldwin <jhb@FreeBSD.org> Cc: freebsd-arch@FreeBSD.org Subject: Re: [RFC] Kernel patches for compilation with gcc 4.0 Message-ID: <20050805162234.GA96585@crodrigues.org> In-Reply-To: <200508051049.26158.jhb@FreeBSD.org> References: <20050803200143.GA70735@crodrigues.org> <200508051049.26158.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050805162234.GA96585>