<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Tony you aren't understanding me.<BR>
<BR>
<BR>
I'm not suggesting to optimize away runtime errors.<BR>
I understand that part of the spec. It has been referenced multiple times recently.<BR>
<BR>
<BR>
I'm saying that the front end knows often/always without a doubt if an operation will overflow or not.<BR>
If the operation will not overflow, it can do the work itself.<BR>
From what you say, it already does.<BR>
<BR>
(I'm going to confuse "overflow" and "subrange error" here briefly.)<BR>
If the operation will overflow, it can just generate code to issue the error.<BR>
Now, for most operations, it doesn't know how the target responds to overflow, so the second statement isn't quite right.<BR>
However, if the operation absolutely will overflow, the frontend should warn. It at least misses some cases, e.g. -FIRST(INTEGER). Granted, on a one's complement system, it won't. But it should warn for the sake of all two's complement systems, which is all of them.<BR>
<BR>
Let's amend the previous:<BR>
If the operation absolutely will overflow, the front end should warn, and then just ask CG to generate the usual code, as if the operation wouldn't overflow. I think it misses some warnings currently. I think it's easy to fix and I'll look into it. Basically whenever the TInt operations fail, should warn.<BR>
<BR>
<BR>
Now, let's somewhat replace "overflow" with "subrange error".<BR>
LeftShift(x, 100)<BR>
acts the same on all targets. It isn't overflow, it is subrange error.<BR>In this case, I assert, the front end should warn, and it shouldn't bother asking the backend to generate code to the shift.<BR><BR>
<BR>
-Jay<BR>
<BR>
<BR>
<HR id=stopSpelling>
From: hosking@cs.purdue.edu<BR>Date: Wed, 3 Mar 2010 10:54:00 -0500<BR>To: jay.krell@cornell.edu<BR>CC: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] overshifting?<BR><BR><BASE>
<DIV><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV><SPAN style="FONT-SIZE: medium" class=ecxApple-style-span>On 3 Mar 2010, at 01:00, Jay K wrote:</SPAN></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></SPAN></DIV>
<DIV><BR class=ecxApple-interchange-newline>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxhmmessage>Why does Word.LeftShift(x , 100) even get to the backend? It should just generate the code to issue a runtime error? (even if x could be zero? I think so.)<BR></DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Because the language spec says that a range error (100 does not fit in the range [0..Word.Size-1]) is a run-time error. Note that the code generator's M3CG_Ops don't specify ranges. The range check is in the *interface* for Word. The m3middle and backend M3CG_Ops are intended to be more general. So, M3CG_Ops.shift_left and shift_right are permitted to take an argument that is not range-checked.</DIV><BR>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxhmmessage>Why doesn't front warn for -FIRST(INTEGER)? It should, right?</DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>This is independent of the range check above. This is an expression that may or may not evaluate depending on the run-time defaults (checking for overflow or not). The compiler must be conservative and let the run-time influence whether overflow checking is in place or not.</DIV>
<DIV><BR></DIV>
<DIV>Overflow checking is a run-time option. The compiler must defer to the run-time.</DIV><BR>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxhmmessage>But still generate code to compute it.<BR>Are these just oversights?<BR></DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Nope. Intentional.</DIV><BR>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxhmmessage><BR>- Jay<BR><BR>> From:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>> Date: Tue, 2 Mar 2010 23:44:22 -0500<BR>> To:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR>> CC:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>> Subject: Re: [M3devel] overshifting?<BR>><SPAN class=ecxApple-converted-space> </SPAN><BR>> The front-end does fold constants where it can prove no overflow will occur. I don't think I understand any of the rest of what you are saying.<BR>><SPAN class=ecxApple-converted-space> </SPAN><BR>> On 2 Mar 2010, at 23:21, Jay K wrote:<BR>><SPAN class=ecxApple-converted-space> </SPAN><BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> > The backend can know if there can be a runtime error -- e.g. if the particular target never checks for overflow. Though that could/should also be exposed in Target.i3?<BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> > I'm slightly leary of this, because currently the absolute norm is no overflow checking, so it seems promising to provide extra value in that case. But maybe the norm will shift and the value will decrease. That is, Target.i3 could advertise that a target never checks for overflow, and then m3front could fold lots of constants for that target. And if Target.i3 indicates a target might/always check for overflow at runtime, then m3front shouldn't fold them. If hypothecal target always checks for overflow, then m3front could omit the code to do the math and just call the runtime error code.<BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> > m3back historically has always folded constants, and "never" checked for overflow (ok, the LeftShift/RightShift shift count probably).<BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> > Only with the 64bit longint has overflow started to be detected by m3back, and it has caught some real cases, where the frontend is quiet.<BR>> > Doesn't that seem wrong in some way?<BR>> > front end should warn and then backend can be quiet?<BR>> > Why does the backend know more than frontend?<BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> > Part of what I mean here is that even if frontend can't always fold the constants, it can know in many cases that overflow absolutely will not occur, and fold those. Like, do the math at compile time, if no overflow, generate the more optimal code. If overflow, generate the slower code and warn?<BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> > - Jay<BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> ><SPAN class=ecxApple-converted-space> </SPAN><BR>> > ----------------------------------------<BR>> >> From:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>> >> Date: Tue, 2 Mar 2010 22:29:47 -0500<BR>> >> To:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR>> >> CC:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>> >> Subject: Re: [M3devel] overshifting?<BR>> >><SPAN class=ecxApple-converted-space> </SPAN><BR>> >> The backend should be silent. The warnings should come from the front-end, which has the type information needed. You cannot optimise away operations that may cause a run-time error.<BR>> >><SPAN class=ecxApple-converted-space> </SPAN><BR>> >> On 2 Mar 2010, at 18:53, Jay K wrote:<BR>> >><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> The front end shouldn't bother asking the backend to shift by overlarge constants, eh?<BR>> >>> Granted, it could be from<BR>> >>> Shift(a, LAST(INTEGER) + ....);<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> so the frontend can't always know, even if the backend thinks it does.<BR>> >>> I need to try some things there -- code that produces a large shift via overflowing constants.<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> Which..hm..begets the question. I have the backend error for constant overflows. But shouldn't it actually warn? You know, people code these things to trigger the runtime behavior:<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> PROCEDURE Crash()<BR>> >>> BEGIN<BR>> >>> EVAL VAL(2, BOOLEAN);<BR>> >>> END Crash.<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> mostly these are warnings at compile, runtime errors.<BR>> >>> But some of these things are now barred by m3back, errors, e.g.<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> EVAL LAST(INTEGER) + 1;<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> Maybe I do need that warning callback after all?<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> - Jay<BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>> ________________________________<BR>> >>>> From:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR>> >>>> To:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>> >>>> Date: Tue, 2 Mar 2010 21:09:54 +0000<BR>> >>>> CC:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>> >>>> Subject: Re: [M3devel] overshifting?<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> I fixed it. It falls back to generating slower code, which is then not hit because<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> it guaranteeably hits a runtime error ahead of it.<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> Perhaps it should just issue a breakpoint there as the code is not reachable.<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> e.g. in C we have:<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> __declspec(noreturn) abort();<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> void F1()<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> {<BR>> >>>> abort();<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> /* breakpoint here */<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> }<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> Given the guaranteed runtime error, why does the frontend bother asking the backend to do the shift?<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> - Jay<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> ________________________________<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> From:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>> >>>> Date: Tue, 2 Mar 2010 14:50:27 -0500<BR>> >>>> To:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>> >>>> CC:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A>;<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR>> >>>> Subject: Re: [M3devel] overshifting?<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> Oh, yes, of course your backend should not blow up on this.<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> On 2 Mar 2010, at 14:46, Tony Hosking wrote:<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> P.S. Here are the signatures of Shift, RightShift, and LeftShift.<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> PROCEDURE Shift (x: T; n: INTEGER): T;<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> For all i such that both i and i - n are in the range [0 .. Word.Size - 1], bit i of the result equals bit i - n of x. The other bits of the result are 0. Thus, shifting by n> 0 is like multiplying by 2^(n)<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> PROCEDURE LeftShift (x: T; n: [0..Size-1]): T;<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> = Shift (x, n)<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> PROCEDURE RightShift (x: T; n: [0..Size-1]): T;<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> = Shift (x, -n)<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> Antony Hosking | Associate Professor | Computer Science | Purdue University<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> 305 N. University Street | West Lafayette | IN 47907 | USA<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> Office +1 765 494 6001 | Mobile +1 765 427 5484<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> On 2 Mar 2010, at 14:44, Tony Hosking wrote:<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> Actually, I should have noticed. Word.LeftShift and Word.RightShift both check the range of the shift parameter. It's not the shift that is out of range. It is the shift constant (in this case 630). If you try Shift(FIRST(LONGINT), -630) you get 0 as expected.<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> So, in fact the run-time error is correct! 630 is not in the range [0..63].<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> On 2 Mar 2010, at 13:54, Tony Hosking wrote:<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> I'm trying to understand this. Surely shifting right will never be out of range? Looks like something is broken.<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> On 2 Mar 2010, at 09:04, Jay K wrote:<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> PutLH(Long.RightShift(FIRST(LONGINT), 630)); PutT("\n");<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> I'm guessing the warning is all you're supposed to get here?<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> C:\dev2\cm3.2\m3-sys\m3tests\src\p2\p227>cm3<BR>> >>>> --- building in NT386 ---<BR>> >>>> new source -> compiling Main.m3<BR>> >>>> "..\Main.m3", line 894: warning: value out of range<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>> ***<BR>> >>>> *** runtime error:<BR>> >>>> *** An enumeration or subrange value was out of range.<BR>> >>>> *** file "..\src\TWordN.m3", line 129<BR>> >>>> ***<BR>> >>>> Stack trace:<BR>> >>>> FP PC Procedure<BR>> >>>> --------- --------- -------------------------------<BR>> >>>> 0x12f0dc 0x48791a RightShift + 0x35 in ..\src\TWordN.m3<BR>> >>>> 0x12f15c 0x47c62f doshift + 0x2c6 in ..\src\Stackx86.m3<BR>> >>>> 0x12f188 0x4485d2 shift_right + 0x1b2 in ..\src\M3x86.m3<BR>> >>>> 0x12f1ac 0x6414ed shift_right + 0xf5 in ..\src\M3CG_Check.m3<BR>> >>>> 0x12f1d4 0x505a4f Shift_right + 0x87 in ..\src\misc\CG.m3<BR>> >>>> 0x12f1f8 0x570641 CompileR + 0x1da in ..\NT386\LongShift.m3 => ..\src\builti<BR>> >>>> nWord\Shift.mg<BR>> >>>> 0x12f218 0x5cec2f Compile + 0x83 in ..\src\exprs\CallExpr.m3<BR>> >>>> 0x12f234 0x5bfee4 Compile + 0x53 in ..\src\exprs\Expr.m3<BR>> >>>> 0x12f274 0x5d19a7 EmitChecks + 0xdf in ..\src\exprs\CheckExpr.m3<BR>> >>>> 0x12f2b4 0x5c8b15 GenOrdinal + 0xa6 in ..\src\values\Formal.m3<BR>> >>>> ......... ......... ... more frames ...<BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >>>><SPAN class=ecxApple-converted-space> </SPAN><BR>> >><SPAN class=ecxApple-converted-space> </SPAN><BR>><SPAN class=ecxApple-converted-space> </SPAN><BR></DIV></SPAN></BLOCKQUOTE></DIV><BR> </body>
</html>