UnixLib compile problems with Norcroft ...

Peter Naulls peter at chocky.org
Tue Jun 4 06:51:17 PDT 2002

In message <4b4151807dsbellon at sbellon.de>
          Stefan Bellon <sbellon at sbellon.de> wrote:

> Hi!
> I remember that you wanted to bring UnixLib into a state that it
> compiles without problems with a Norcroft compiler as well. The more
> strict version 5.44 of Norcroft C gives two errors whereas older

> versions raised just warnings in those places:
> cc -depend !Depend -throwback -fcah -JUnixHdr: -wda -wp  
> -D__UNIXLIB_INTERNALS -c -o unix.o.unix "^.source.unix.c.unix"
> Norcroft RISC OS ARM C vsn 5.44 [12 Apr 2002]
> "^.source.unix.c.unix", line 388: Warning: implicit narrowing cast: '='
> "^.source.unix.c.unix", line 506: Error: non-value return in non-void
> function

The problem here is abuse of the __badr macro.  Someone might to suggest
a sensible fix.

> cc -depend !Depend -throwback -fcah -JUnixHdr: -wda -wp
> -D__UNIXLIB_INTERNALS -c -o math.o.exp "^.source.math.c.exp"
> Norcroft RISC OS ARM C vsn 5.44 [12 Apr 2002]
> "^.source.math.c.exp", line 128: Error: undeclared name, inventing
> 'extern int abs()'

abs is declared in stdlib.h.  There's probably some silliness that means
it's included for GCC, or it's recognised as a builtin.

> Just wanted to mention that.

Compiling with lcc could be a nice experiment.  I've still got loads of
warning fixes for Unixlib hanging aout :-|

 Peter Naulls - peter at chocky.org
 Homepage                     -  http://www.chocky.org/
 RISC OS Projects Initiative  -  http://initiative.chocky.org/
 RISC OS C Programming        -  http://www.riscos.info/

More information about the gcc mailing list