Subject: Re: Preliminary test of i386 kernel compiling with GCC 4.0
To: Vincent <10.50@free.fr>
From: Ian Lance Taylor <ian@wasabisystems.com>
List: tech-kern
Date: 10/06/2004 11:16:40
Vincent <10.50@free.fr> writes:

> Anyhow, the compiler fails on an internal error somewhere later:
> 
> 
> ../../../../kern/kern_lock.c:233: internal compiler error: in
> gimplify_expr, at gimplify.c:3975
> 
> which appears to be a macro: INTERLOCK_RELEASE(lkp, LK_SPIN, *s);

The compiler obviously shouldn't crash.  It would be helpful if you
could report that as a gcc bug at http://gcc.gnu.org/bugzilla/.
Attach the preprocessed source code--the .i file generated by the gcc
command line with the --save-temps option.

> and another error somewhere later, which appears to be more interessing :
> 
> ../../../../kern/sysv_msg.c:84: error: static declaration of 'msgpool'
> follows non-static declaration
> ../../../../sys/msg.h:200: error: previous declaration of 'msgpool' was here
> ../../../../kern/sysv_msg.c:85: error: static declaration of 'msgmaps'
> follows non-static declaration
> ../../../../sys/msg.h:201: error: previous declaration of 'msgmaps' was here
> ../../../../kern/sysv_msg.c:86: error: static declaration of 'msghdrs'
> follows non-static declaration
> ../../../../sys/msg.h:202: error: previous declaration of 'msghdrs' was here
> 
> Same thing in sysv_sem.c, in dev/wsfont/wsfont.c, in dev/pckbport/pckbport.c
> 
> gcc 3.4.2 compiles all those files OK.

These look to me like a minor, unimportant, bug in the NetBSD
sources--if the variables are static in sysv_msg.c, then it doesn't
make sense to declare them as extern in msg.h.

Ian