Mail Archives: djgpp/2004/04/23/05:30:04
Alex Vinokur <alexvn AT big DOT foot DOT com> wrote:
> I prefer to compile C-program with C++ compiler.
I'm pretty sure you won't like to hear this, but: that preference is
silly to the point of braindead, and has been for a *long* time,
arguably ever since the first people came up with that idea.
There may have been a point to this strategy back in the days when C++
compilers actually were better at picking up problems in C code than
the C compilers of that time. But that time is *over*, and has been
for about as long as DJGPP exists. GCC is way better at finding
problematic C code than G++ can ever be.
What is it that you believe you're going to gain from this, compared
to using the right tool for the task?
*) Use the C++ compiler, for whatever advantages you believe it has, but
be consequent and write C++ code, then.
*) Write C code and use the C compiler for compiling it.
> $ gpp foo.c
> error: invalid conversion from `void*' to `unsigned int*'
That error is a false negative created by incorrect use of the tools.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -