Subject: Re: gcc 2.7.2
To: Niklas Hallqvist <niklas@appli.se>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: current-users
Date: 12/16/1995 16:29:22
niklas@appli.se writes:

>>>>>> "Michael" == Michael Graff <explorer@flame.org> writes:

>Michael> I know it isn't near production, just in the tree, but has
>Michael> anyone managed to build a kernel and strtoq.c (in libc) using
>Michael> 2.7.2?  Many things seem to compile cleanly while others
>Michael> break at compile time.  I have yet to find something which
>Michael> breaks at run time.  Well, differently than it did with 2.4.5
>Michael> ;)
>
>I don't get it.  I've run 2.7.x for a long time (since early October I
>think) for everything in NetBSD/Amiga.  You mean you see MI problems
>with GCC 2.7.2 and NetBSD?  Please be more specific.  I've done i386
>and m68k kernels for quite some time as well...

I think the underlying problem is that the files in /usr/share/mk
have beem changed to add -Werror as a default switch for all
C and C++ compilation.  Source filesd that previously generated
compilation warnings now fail to compile.

The NetBSD 1.1/pmax release was built with gcc 2.7.1. (There are no
substantive differences for the mips port of gcc between 2.7.1 and
2.7.2, so this shows it's not a gcc problem.) With -Werror, several
files fail to compile due to warnings that are now treated as errors.
strtoq.c is one such file. If I remember correctly, line 108 of strto.c
negates the largest possible long long, which gcc flags as an overflow
-- at least on mips CPUs, and apparently on m68k, too.  Someone from
Core is aware of the problem and is looking into it.

At least on a pmax, many calls to ctime() (e.g., in fsck?) also fail,
due to argument mismatches -- I guess due to signed-ness mismatches.
Long-term, I think finding and fixing such warnings is a Good Thing.

--Jonathan Stone
  (Chief Slave of the NetBSD/pmax port)