Subject: warnings compiling the kernel with gcc 2.8.1
To: None <current-users@NetBSD.ORG>
From: Taras Ivanenko <ivanenko@ctpa03.mit.edu>
List: current-users
Date: 04/18/1998 19:04:53
I am trying to cross-compile mac68k kernel on SunOs 4.1.3 host system
with the GCC coming from the standard 2.8.1 distribution and I am
getting dosens of warning all over kernel source tree

"suggest braces around ambiguous 'else'"

or something very similar. The statements in questions look like

if(condition)
	if(condition)
		statement;
	else
		statement;

The source is -current as of April 15.
The lines above are, of course, valid C statements and the compiler
has a way of resolving ambiguity and the only question is the
programming style. I would put the braces (as the compiler suggested)
around the body of the first 'if'. If this is not deemed necessary, we
need some compiler switch to suppress those warnings. I can go through
the offending files, insert braces and submit send-pr if it would be
an acceptable solution. I am also surprised that egcs did not show those
warnings. 

As a side comment, I still got a warning about main() function, no
matter what switches I gave to compiler (-Wno-main or -ffreestanding)

	Taras Ivanenko.