J
jacob navia
Recently we had a discussion about the following code:
void f(long *lp) { *lp = 0; }
int main(void) { int i; f(&i); return i; }
lcc-win doesn't emit any diagnostic in normal mode, and doesn't
emit a diagnostic with the higher warning level.
It emits a diagnostic only in the highest warning level:
lcc -A -A foo.c
will diagnostic that with a warning.
Why?
Because under windows (32 and 64 bits) there is
absolutely no PRACTICAL difference between a
long and an int. They are completely equivalent types.
The diagnostic would just add CLUTTER and NOISE to
the output of the compiler.
The problem is that if the compiler emits too many diagnostics
the important ones will go unnoticed, swallowed by the noise
of the unimportant ones.
Note that Microsoft C, for instance will not diagnose this
even with the highest warning level.
This are the reasons behind the decision. Some people like
heathfield or becarisse use this as a "proof that lcc-win is
useless", etc. Their usual stuff. Note that lcc-win is not
just for pleasing pedants in comp.lang.c but it is useful
for doing REAL work. The objective is not to please
pedants here.
void f(long *lp) { *lp = 0; }
int main(void) { int i; f(&i); return i; }
lcc-win doesn't emit any diagnostic in normal mode, and doesn't
emit a diagnostic with the higher warning level.
It emits a diagnostic only in the highest warning level:
lcc -A -A foo.c
will diagnostic that with a warning.
Why?
Because under windows (32 and 64 bits) there is
absolutely no PRACTICAL difference between a
long and an int. They are completely equivalent types.
The diagnostic would just add CLUTTER and NOISE to
the output of the compiler.
The problem is that if the compiler emits too many diagnostics
the important ones will go unnoticed, swallowed by the noise
of the unimportant ones.
Note that Microsoft C, for instance will not diagnose this
even with the highest warning level.
This are the reasons behind the decision. Some people like
heathfield or becarisse use this as a "proof that lcc-win is
useless", etc. Their usual stuff. Note that lcc-win is not
just for pleasing pedants in comp.lang.c but it is useful
for doing REAL work. The objective is not to please
pedants here.