Re: Style question: comparison between signed and unsigned?

Richard Gooch (rgooch@atnf.CSIRO.AU)
Tue, 23 Sep 1997 11:34:12 +1000


Dean Gaudet writes:
>
>
> On Mon, 22 Sep 1997, Linus Torvalds wrote:
>
> >
> >
> > On Mon, 22 Sep 1997, Dean Gaudet wrote:
> > >
> > > I know this is where the warning is generated. But my claim is that this
> > > supposedly "bad" code is forced due to the lame prototype for read().
> > > Overloaded return values are bad.
> > >
> > > You could misinterpret the compiler's warning to mean you need a cast ...
> > > but really it means you need to redesign your code :)
> >
> > Redesign the whole C language? Or "just" all of the library?
>
> "just" all of the library. It's really what's at fault. Microsoft (or
> IBM) got it right when they did OS/2's system api ... and win32's api also
> does it right. The return value is always an error code, other returns
> are passed by reference.

Great. More junk to throw onto the stack and more things to bash the
cache. Using that model I guess we should also abandon NULL pointers
to indicate errors...

Regards,

Richard....