nobu.nokada / softhome.net wrote:
> 
> Hi,
> 
> At Wed, 10 Dec 2003 03:42:00 +0900,
> Daniel Berger wrote:
> > The file.c warning still (strangely) remains:
> >
> > file.c: In function `rb_stat_inspect':
> > file.c:329: warning: unsigned int format, different type arg (arg 3)
> 
> Replace %o with %lo.

That fixes it.  Thanks.

> > From dl.c:
> >
> > dl.c:167: warning: subscript has type `char'
> > dl.c:169: warning: subscript has type `char'
> 
> Is it warned at other places where ISDIGIT() is used?  Then we
> might need to change ISALPHA() and so on.  Although I guess
> this warnings are useless at all for ctype macros, and ignoring
> would be best.

So it would seem.  Here's a few:

rubyext.c: In function `rb_syck_mktime':
rubyext.c:208: warning: subscript has type `char'
rubyext.c:213: warning: subscript has type `char'
rubyext.c:218: warning: subscript has type `char'
rubyext.c:223: warning: subscript has type `char'
rubyext.c:228: warning: subscript has type `char'
rubyext.c: In function `yaml_org_handler':
rubyext.c:489: warning: subscript has type `char'
rubyext.c:494: warning: subscript has type `char'

> 
> > > > numeric.c:791: warning: implicit declaration of function `finite'
> > >
> > > Does math.h on Solaris lack finite()?
> >
> > Looks like it's defined in ieeefp.h on sun.  I added
> >
> > #if defined(sun)
> > #include <ieeefp.h>
> > #endif
> >
> > That seemed to work.
> 
> Ok, I agree to Eric.

Ok, sounds good.
 
> > > > socket.c: In function `bsock_getsockopt':
> > > > socket.c:317: warning: implicit declaration of function `alloca'
> > >
> > > ALLOCA_N() macro is used in many place, why is it warned only
> > > here?
> >
> > Actually, that warning shows up in many places, but that warning has
> > been brought up on the list separately, so I didn't want to list them
> > all again.
> 
> Do you know where alloca() is declared?

In alloca.h.  I think the relevant thread is ruby-talk 55208.  Although
that thread refers to FXRuby, I suspect it's the same issue in core
Ruby.
 
> > PS - Do you care about this warning? "warning: suggest parentheses
> > around assignment used as truth value".  If not, do you happen to know
> > the option to disable that warning?
> 
> It is sometimes asked.  Actually, it can be suppressed by
> double parentheses in GCC, but matz dislike it.

Yeah, I don't necessarily believe in catering to gcc quirks, either.

Regards,

Dan