On Tue, 24 Dec 2002 13:07:21 +0900, "Stephen J. Turnbull" said:
Yes, but it's the _vendor_'s words. Ben says he demonstrated
the
behavior, they admitted it, and they refused to change it.
And given that they apparently cited chapter-and-verse to justify their
refusal, I have to consider the GCC people totally in the right on this one.
This leaves us with two basic options:
1) Somebody wraps their brain around the problem code in XEmacs (which may
be quite evil, as you note:
Lisp_object bar (Lisp_Object x)
{
Lisp_Object y;
LISP_ASSIGN(y,x);
return y;
}
This is _not_ a win. And replacing just the "dangerous
ones" is GCPRO
all over again.
Amen. ;) Note that I've pondered this for a bit, and haven't convinced
myself that a sufficiently aggressive compiler may not *still* present us
with great screwage - remember that if the compiler can screw us by reordering
code, it can screw us by reordering the explicit temporaries unless you
flag them as 'volatile' (otherwise it can screw up by optimizing them into
total non-existence). However, 'volatile' has some performance issues that
we'd *NOT* want having inside a LISP_ASSIGN macro....
I don't consider it offensive, and I doubt Ben does. But I think
you
are leaving too little responsibility to the compiler writers. It is
not a purely technical problem. It is also a matter of user
confidence. Theirs to lose....
To be honest, my confidence is more shaken by the out-and-out compiler ICE's
that I've managed to get. There's a routine in XFree86 called
'mipmap2.c'
which will crap the compiler out totally if compiled with '-O3 -march=pentium4
-mfpmath=sse' (though weirdly enough, using -Os rather than -O3 works).
That bug started somewhere back whenever they added fpmath support,
and is still in 3.2.1.
And quite frankly, I'd much rather know the gcc people are devoting their
limited resources to fixing out-and-out *bugs* than trying to "fix" something
with unspecified semantics..
There's always option 2: Heave it over the side. ;)
/Valdis