Hi,
On Tue, 26 Dec 2017, Michael B. Smith wrote:
No. Warnings are never required diagnostics (and even if, what
specifically would you want to warn about in this case?). The only
require diagnostics are from constraint violations. Most other
undefined behaviours don't need to be diagnosed (of course, if easily
doable it's nice to diagnose them).
Here we disagree.
I was arguing from the point of standard conformance, just in case this
wasn't clear. I thought you did the same, but now I think you're arguing
from a quality of implementation perspective. If so I agree with you,
such kinds of warnings are nice to have. As often the case, though, you
need to find the sweet spot between difficulty of implementing them and
returned value of the warnings.
As this construct is nearly never used in the real world the value of such
warning wouldn't be very large. Implementing it to the fullest extent
possible (i.e. for calls to functions in the same unit) entails storing
the necessary meta-info, and hence comes at a non-trivial cost.
Personally I don't think it's worth it.
More worth would be IMHO a mode where TCC doesn't stop after the first
error and instead tries to recover. Has its own set of problems but would
make tcc more like other C compilers.
Ciao,
Michael.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel