C:\c>\q\qb64\internal\c\bin\g++ -Wl,-Map,delme.map delme.cpp -o delme.exe
delme.cpp: In function 'int main()':
delme.cpp:5:32: warning: pointer of type 'void *' used in arithmetic [-Wpointer-
arith]
delme.cpp:6:31: warning: pointer of type 'void *' used in arithmetic [-Wpointer-
arith]
delme.cpp:7:32: warning: pointer of type 'void *' used in arithmetic [-Wpointer-
arith]
I discovered this in trying to set the hbrBackground member of a WNDCLASSA structure. When specifying a system color, you are supposed to add 1 to the constant. To overcome an error from mingw-w32, (something like this:)
error: invalid conversion from 'int' to 'HBRUSH {aka HBRUSH__*}' [-fpermissive]
I used an explicit cast to HBRUSH, but the cast had higher precedence than the addition, and I had forgotten to use parenthesis. So it silently added 4 instead of 1.
according to the MSDN documentation, windef.h is supposed to do this: