Mail Archives: djgpp/1997/03/04/08:38:56
On Tue, 4 Mar 1997 06:01:08 GMT, chambersb AT juno DOT com (Benjamin D Chambers) wrote:
>It is my understanding that gcc complains when you do so. In fact, I
>believe gcc complains when _anything_ is converted without a cast
>(although I don't have time to verify - if anyone knows the answer,
>please let me know if I'm wrong).
I learned C with the understanding that typecasted conversions were good
programming practice. In C, however, typecasting malloc is not necessary. ANSI
C++ forbids implicit conversion of void pointers (according to the g++ error I
got). GCC and Turbo C both allow implicit void conversions according to my
brief tests with all warning messages enabled. In other words, neither Turbo C
nor GCC complained about it in a .C program.
- Raw text -