>>>> "Dmitry" == Dmitry Bely
<dbely(a)mail.ru> writes:
Dmitry> Compiler bugs should be proven. The presence of crash is
Dmitry> obviously not enough.
Everything should be proven. There should be no crashes. Good luck.
The question is, is it worth proving some particular thing? If you
ask me, the compiler (and library) authors should be more interested
in getting code that works under the broadest possible set of
circumstances rather than defending whatever tricky thing they
currently do, relying on the ability to excuse silly behavior with
"the standard doesn't guarantee sane behavior in this case."
While I strongly dislike faking a union with casts, I sympathize with
Ben having recently had a similar experience with malloc. I don't
think that having a standard is meaningful unless (a) it's obvious by
Patent Office standards or (b) the people who are excusing surprising
behavior with "the standard says it's OK" are willing to explain how to
go about writing compliant code. Neither (a) nor (b) is satisfied in
the "union builds crash when they shouldn't" case.
Basically what it comes down to is the compiler writers are saying "we
don't support union type when you use it to make obscure things clear,
only when you use it to make trivial things verbose." Why bother?
Ben's reaction, though a little violent, is perfectly plausible: OK,
we'll deprecate union type since in practice we can't rely on
reasonable behavior.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.