it's useful to compile with union type to catch problems, as stephen mentions, but it
has such a propensity to create random crashes due to compiler bugs, which often appear
like xemacs problems, that people who don't have a good idea of its uses should not
it's similar with c++ but there are other advantages ... for example my
recently-introduced bad-gcpro-catching code. note also that it's possible to catch
insufficient gcproing using c++, but somewhat difficult. i put in a comment to this
effect in my kkcc patch.
btw michael you're not compiling my kkcc patch with --use-union-type, are you? (sorry
if this appears in another message as well. internet cafes suck.)
------- Original Message -------
Tue, 17 Dec 2002 22:35:11 +0900 Stephen J. Turnbull?wrote:
>>>>> "Ville" == Ville Skytt
Ville> On Tue, 2002-12-17 at 04:20, Ben Wing wrote:
>> stephen -- while you're in the process of modifying PROBLEMS,
>> please add an entry about union type and its propensity to
>> cause crashes. here's some text that should get you started:
Ville> Uh, --use-union-type has been many times suggested on
Ville> xemacs-beta as a way to prevent crashes in something
Ville> related to aggressive compiler
Ville> What's correct?
To some extent, both. Sometimes you lose, and other times you lose
big. There's nothing we can do about compiler bugs except write them
up in PROBLEMS and code defensively. There are any number of
temporaries in XEmacs notated with "Compiler XYZ chokes without this."
This is more of the same. :-(
To me it's a pragmatic issue (if anything, union type is more
"righteous" than the int Lisp_Object type). GCC (and now VC++) has
historically had problems with unions. OTOH unions have historically
been good at smoking out "if (lisp_object) ..." constructs and the
like, and to some extent aliasing issues.
I think if you look, you'll find that (a) it's often been me
recommending union type and (b) --use-union-type typically doesn't
solve any problems. If better diagnosis tools are now available, then
there may be reason to avoid union type.
 They've also had problems with std C++ ... but I doubt Ben would
argue that is EVIL EVIL EVIL ;-)
 Ie, you're really only citing one opinion.
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.