quote:Original post by daerid
Those are specific cases.
They''re
extremely common. For instance, any code that uses malloc() has a high probability of breaking (in C, it''s never correct to cast malloc()''s return value; in C++, it''s mandatory except for when assigning to void* pointers).
quote:Saying that "C can''t be compiled on a c++ compiler" is just too generalized.
Fine. ANSI C can''t be compiled on a C++ compiler. Better?
quote:More correctly it would be: "There are some C programs that can''t be compiled with a C++ compiler".
IOW, a C++ compiler cannot be used as a C compiler.
quote:The C++ standard basically says you should be able to compile a C program on a C++ compiler.
It says nothing of the sort.
quote:But like everything, there are exceptions to the rule.
Exceptions, such as writing ANSI C code.