Mark Crispin wrote:
 Okay.  Tho, in these cases you're casting a 64-bit pointer
to and from a 32-bit unsigned int.  So, it's not wrong to
warn about it.

Actually, it is wrong to warn; at least if you believe K&R. The whole point of explicit casting is to tell the compiler not to warn about "unsafe" casts; and there's substantial text (and precedent) about how an "unsafe" cast is done. Every compiler which gives these warnings ends up generating the correct code anyway.

Okay. I can see that point. But, when K&R was written, there was much less variety in hardware implementations and type-sizes. At least, that's my belief. It is, sadly, a bit before my day.

  IMHO, I think it's not unwise to warn about casting a
64-bit pointer value into a 32-bit value.  But, you may
be right that this is just because programmers too oft tend
to assume "pointers are 32-bits", at least in the last 10 years.

Unfortunately, some people who make a programming mistake blame the compiler for not warning them the way a Pascal compiler would.[...]

Understood. I don't think I'm trying to do that here, but people do, I agree.

Anyway, if you can suggest something that can be done at the osdep level, I'll be very interested. Currently, the same osdep file is used for all versions of BSD/i386, OpenBSD, and NetBSD. Obviously, it would easiest if we could do something that applies to all of these.

Yup. I hope to take a look at this today.

  What's the approximate timeline for bundling and releasing 2004b?
(Which I'll then need to get updated in the NetBSD pkgsrc tree)

  Thanks!

- Chris

Reply via email to