Author Topic: Compiler did not catch  (Read 252 times)

shankle

  • Member
  • ****
  • Posts: 799
Compiler did not catch
« on: November 01, 2018, 07:00:13 AM »
          10-31-2018

    Running GoAsm 64-bit.
    Swh12  dd  0
    mov rcx,[Swh12]
   
    The compiler did not catch this
    Swh12 should be defined
    Swh12  dq  0
   
    Thought you might want to know   
   

Yuri

  • Member
  • **
  • Posts: 173
Re: Compiler did not catch
« Reply #1 on: November 02, 2018, 12:50:46 AM »
That is explained in the manual: Why GoAsm does not type or parameter check.

shankle

  • Member
  • ****
  • Posts: 799
Re: Compiler did not catch
« Reply #2 on: November 02, 2018, 01:37:33 AM »
Thank you Yuri for replying.
I stand corrected.
Will in the future have to be more careful about sizes of
items I use. It is sure hard to find your own errors like
the one I made. But now I will be on the lookout for
this kind of error.

Yuri

  • Member
  • **
  • Posts: 173
Re: Compiler did not catch
« Reply #3 on: November 02, 2018, 04:48:00 PM »
I use prefixes to remind myself of variables' sizes. wMyVar, dwMyVar, qwMyVar — word, double word and quad word respectively.