J
John J. Smith
jacob said:MSVC++ says:
------------------------------------------------
twarn1.c(11) : warning C4057: 'initializing' : 'int *' differs in
indirection to slightly
different base types from 'long *'
twarn1.c(12) : warning C4057: 'initializing' : 'unsigned int *' differs
in indirection to
slightly different base types from 'unsigned long *'
twarn1.c(14) : warning C4057: 'initializing' : 'unsigned char *' differs
in indirection to
slightly different base types from 'char *'
-----------------------------------------------
only at the highest warning level (-W4)
At the default level absolutely NO warnings are issued.
I am ready to change the compiler if any contradiction
to the standard is detected. I do not see here why a
warning is mandatory however.
Well if nothing else, it would definitely help discover portability
issues since plain int and long (and pointers thereto) are not
necessarily the same size and/or representation. I also think the
parent article to my response was wondering whether signed and
unsigned quantities should be treated differently.
context was
I can confirm that lcc-win32 (version 3.8) issues a warning for
the statement marked 'line 12:' but not for the statement marked
'line 13:'. (MSVC warns in both cases)
Is lcc-win32's behaviour really intentional?