Background:  I was looking at a bug in a program that supports both 64 bit
and 31 bit modes (so it can run on non-z machines).  The control block has
64 bit pointers in it and for 31 bit mode, it uses the 'low order' fullword
of the pointers.  The issue was one place where the high order fullword got
used rather than the low order fullword.

So looking at TYPECHECK(MAGNITUDE,REGISTER) (HLASM default), I played around
with defining 31 bit and 64 bit registers and seeing if I could get some
'help' catching this kind of issue before it got into the field.

Ex:

R1     EQU  1,,,,,GR31
RW1  EQU  1,,,,,GR64
...

PTR   DS     AD
...

          L       R1,PTR                <= hoped this would generate a
warning but it didn't
...

Now for the real question.  When I coded:

          LMH   RW1,RW1,=F'0'

I got a warning about incompatible registers which seems odd.  Since LMH
sets the high order fullword of a 64 bit register(s), I would think the
TYPECHECK would accept this notation and complain if I had specified the 31
bit registers.

Is anyone using TYPECHECK to successfully catch issues earlier in the
process?

Mark Hammack
Senior Developer
Systemware, Inc.

Reply via email to