-DSTRICT warning fixes

Patrik Stridvall ps at leissner.se
Sat Jul 28 15:36:53 CDT 2001


> On Sat, 28 Jul 2001, Patrik Stridvall wrote:
> [...]
> > The real reason that we should support compiling Wine with -DSTRICT
> > is not because handles becomes pointers but because callbacks gets
> > the correct prototype.
> > 
> > I case not you haven't realized the obvious, it doesn't matter if
> > the handles are 32-bit integer or 32-bit pointers as long as
> > all handles are the same. The code either
> 
>    No, I think you have missed something: when compiling with -DSTRICT
> on all handles are not the same. 

Note I said same but meant compatible. Wrong choice of words.

> For instance you cannot do
> hDesk=hAccel. That's because with -DSTRICT on you have:
> 
> typedef struct HDESK__ { int unused; } *HDESK;
> typedef struct HACCEL__ { int unused; } *HACCEL;
> 
>    Thus HDESK and HACCEL are incompatible pointer types. This 
> brings us
> more type safety which is the whole point of -DSTRICT.

Oh sure, but the point is that if code, that are semanticly 
correct, cares whether you are strict or relax
the type, the code it wrong. Perhaps I was I little unclear on
that point. Being strict obviously makes it easier to find
semantic errors, but that was not the point at all.
 
>    About 64bits Windows I don't know yet how we are going to do that.
> But you have to check exactly what Windows 64bit does, not just
> extrapolate from the way Unix 64bit does things. AFAIK the 
> approach used
> by windows is quite different from that which Unices took.

Yes, unfortunately, but I'm primarily worried about Win32 on
64-bit platforms.




More information about the wine-devel mailing list