cppcheck sept 18 redux

Luke Benstead kazade at gmail.com
Tue Sep 22 09:48:35 CDT 2009

2009/9/22 Ben Klein <shacklein at gmail.com>:
> 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.

Ah, I see.. but in that case, how is an array different to using a
pointer, like in Vitaliy's example? Surely that's the same thing


More information about the wine-devel mailing list