<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Tony, these two questions seemed to go unanswered:<BR>
<BR>
1)<BR>
<BR>
What should this code do:<BR>
<BR>
<BR>
Word.LeftShift(..., 100); (* where 100 >= BITSIZE(INTEGER),<BR>
and similar for Long.LeftShift and shift >= BITSIZE(LONGINT) *)<BR>
<BR>
<BR>
I think m3front should generate a warning<BR>
and then either generate the same code as today,<BR>
or something smaller where it only generates code<BR>
to issue the runtime error.<BR>
The warning is missing.<BR>
"Generating the code same as today" is harder on backends,<BR>
since they have to check for this condition and handle it somehow,<BR>
though it doesn't matter much what they do, since the runtime<BR>
error generation will always run and anything after it never will.<BR>
<BR><BR>2) What should this code do:<BR>
<BR>
<BR>
EVAL -FIRST(INTEGER);<BR>
<BR>
<BR>
I believe the frontend should issue a warning.<BR>
And then generate the same code as today.<BR>
Just the warning is missing.<BR>
<BR>
<BR>
<BR>
3) Aside, and not a question.<BR>
I believe, esp. at this point, the notion that overflow checking is a per-thread setting<BR>
is a mistake. It has "never" been used, save on a small number of targets.<BR>
It is too late to foist that change on any code thread-wide.<BR>
The correct thing to do is introduce different interfaces/modules/types/functions<BR>
which either always do overflow checking, or, perhaps but less likely,<BR>
new interfaces/modules/types/functions that are runtime configurable, as<BR>
INTEGER was originally speced.<BR>
<BR>
<BR>
Even the original spec not so great in my opinion.<BR>
There are too many things to code correctly, let alone worrying about "this"<BR>
possibly varying underneath you. The overall system is too much a combination<BR>
of different code to expect just because one set of code wants integer overflow<BR>
to be an error, that all the code can deal with that.<BR>
Better to have separate interfaces/functions/types for the different functionality.<BR>
<BR>
<BR>
<BR>
- Jay<BR> </body>
</html>