Here are some hints from the lcc-win32 compiler
lcc-win32 reports this as a warning.
lcc-win32 reports an assignment that is not used further
in the program. Other dead code could be reported if more
was done in this direction.
This is detected at compile time when the division is made
by two compile-time constants. Code could be generated at
run time to check division.
lcc-win32 reports this when the function/variable is static.
For non-static variables, this is done by the lcc-win32's linker
This is reported and easy to detect.
A warning is issued when a function declared as returning a value
doesn't return one.
This is not reported but could be done. If you want this, it would be
very difficult, since this is common practice:
doesn't use the return value of printf but it is valid code.
I have been arguing in this group (and in the standards discussion
group) about the necessity of doing this. The problem is that
you would need a new kind of pointers, (bounded pointers) that
would carry size information.
lcc-win32 forces this. Any boolean is casted to 1 or zero.
lcc-win32 checks this.
lcc-win32 checks this
lcc-win32 will warn you that a higher scope variable is shadowed
if you request this type of warnings.
This is checked
The same as item 6.
This is a syntax error
This is an error. It stops compilation.
I suppose that you mean identical variable names. This is an error
The same error as 15: redefinition, syntax error. Compilation stops
Feel free to write me if you want further details.
. *** ia.edu/~lcc-win32