Large shifts (was: Bug in compilers)

Luke Kendall luke at research.canon.oz.au
Fri Jun 28 06:22:00 AEST 1991


Sigh.  Wrong again.  Yes, even in ANSI it's undefined.  My problem is
that I can hardly believe that this sort of semantic discontinuity can
exist; and that the ANSI committee chose not to fix it.

I assume it's happened because some chips (e.g. SPARC) don't internally
mask the shift operand, and you want the normal case (of a shift) to not
incur the overhead.  Sad.

(I mean, it is a pretty clean language, implicit & on arrays and functions
 aside).
-- 
Luke Kendall, Senior Software Engineer.      | Net:   luke at research.canon.oz.au
Canon Information Systems Research Australia | Phone: +61 2 805 2914
P.O. Box 313 North Ryde, NSW, Australia 2113 | Fax:   +61 2 805 2929




More information about the Comp.sys.sun mailing list