On 2004.03.08, Bob Woodside <[EMAIL PROTECTED]> wrote:
>
>         [Grumble.] The culprit is the -Wconversion flag set in
> $(NSHOME)/include/Makefile.global. Without it, all the warnings go away.
> Short of killing this flag, I couldn't coerce gcc to be happy with any
> amount of typecasting.

Hahaha.  This reminds me of the (probably fictitious) anecdote of the
first-semester Computer Science student:

    Student:    Hurray!  My program compiles!  It's over 1,000 lines of
                code!

    Professor:  Yes, but it's all inside an "#if 0" and "#endif"
                clauses.

    Student:    Well, duh!  That's the only way I could get it to
                compile without throwing any errors!

>         I think this flag is either overly aggressive, or maybe buggy in
> recent releases of gcc. Does anyone know whether it's really needed in
> the AOLserver core, or is it just that it's always been done that way?

It's not overly aggressive and it's likely not buggy.  It's telling you
that you have prototypes which don't match the function definitions, and
worse, the prototypes coerce a different promotion of types than the
function definition would.  These are good warnings to have turned on
and *mostly* safe to ignore, but they are clearly sources of potential
bugs in edge cases where inputs are expected to be a certain type based
on the way the function definition is written, but due to the prototype,
the values being fed in are a different type because of the promotion
caused by the prototypes.

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to