cppcheck sept 18 redux

Ben Klein shacklein at gmail.com
Tue Sep 22 09:45:13 CDT 2009


2009/9/23 Luke Benstead <kazade at gmail.com>:
> If it IS the case that this doesn't cause a crash and is perfectly
> valid, can someone explain to me how/why this works? Or point me (no
> pun intended) to the bit in the C spec that explains it? Coz the way I
> read it, it has to dereference dmW, otherwise how would the compiler
> find the address of the array? ... so confused :)

I believe it's because the array (as a pointer) is at the same
location as start of the struct (as a pointer). Compiler then applies
pointer arithmetic without dereferencing.



More information about the wine-devel mailing list