What, endlessly casting from unsigned char* to signed char* and back again?
No, if you do it right the number of casts needed is quite small. I
remember you making this claim before, though I no longer remember your
reasons for thinking it was necessary, only that they didn't make sense.
Leaving such aspersions on my abilities aside ...
I'm just referring to aspersions you cast on yourself. You admitted to
having learned as little about C as possible, just enough to make
minimal use of it, because of your distaste for the language.
... let me take some code not written by me: one C source module of a Python
interpreter. And the results of compiling with the standard options of these
six compilers are:
gcc: many warnings, one error
Pelles C: many warnings (different from gcc), and two errors, one different
Lccwin32: one warning (different from any of the above)
DMC: four errors (different from any of the above)
Clang: loads of warnings (same as most of the gcc ones), no errors
gcc/TDM: same as gcc, plus one more error thrown in
It would be much more meaningful to identify precisely the code that
you're compiling, and the compiler options you were using, along with
the actual text of the messages.
As I said, every compiler will find something different to complain about.
(The problem being that a C program isn't just specified by its source code,
you also have to specify the compiler, the version of the compiler, and the
exact collection of options that will make it all work. And this is for just
*one* platform and *one* OS! So much for portability.)
You're right, the C standard mandates that at least one diagnostic
message, contents unspecified, must by generated by the processing of a
translation unit that contains any syntax errors or constraint
violations, as well as for a couple of specific conditions. That's
really quite minimal. Everything beyond that is up to the individual
However, while the standard permits a great deal of variation,
real-world compilers need to be useful to their users, and the actually
amount of variation between compilers is much smaller than the standard
permits it to be. I strongly suspect that a C expert looking at those
error messages and the source code would use the word "different" a lot
less frequently than you did. I suspect that many of the supposedly
"different" messages were really addressing the same problematic code
from multiple different (and equally valid) points of view.