Re: When to emit diagnistics
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Mon, 14 Jul 2008 19:17:01 +1200
jacob navia wrote:
Recently we had a discussion about the following code:But they are incompatible types. I thought you'd made a Linux port of
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 compiler? There you would have an issue.
Both Sun cc and gcc warn on their default settings.
The diagnostic would just add CLUTTER and NOISE toMost shops have a "no warnings in the build" rule for that very reason.
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.
It isn't hard to do.
--
Ian Collins.
.
- Follow-Ups:
- Re: When to emit diagnistics
- From: Richard Heathfield
- Re: When to emit diagnistics
- References:
- When to emit diagnistics
- From: jacob navia
- When to emit diagnistics
- Prev by Date: Re: When to emit diagnistics
- Next by Date: Re: When to emit diagnistics
- Previous by thread: Re: When to emit diagnistics
- Next by thread: Re: When to emit diagnistics
- Index(es):
Relevant Pages
|