gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

latest git push on master branch


From: Gaius Mulley
Subject: latest git push on master branch
Date: Mon, 22 Jun 2020 22:51:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi,

in the gm2-master branch are changes to allow for sub-expressions to be
reported to the GCC error mechanism. For example here are some of the
regression test results (which are expected to generate errors from
gm2):

$ gm2 -g -c val2.mod 
val2.mod:20:17: error: PROCEDURE test (c: CARDINAL) ;
   20 | PROCEDURE test (c: CARDINAL) ;
      |                 ^
val2.mod:31:10: error: item being passed is expression expression of type ‘REAL’
   31 |    test (VAL (REAL, c))
      |          ^~~
val2.mod:32:1: error: parameter mismatch between the 1st parameter of procedure 
‘test’
   32 | END val2.
      | ^~~
val2.mod:31:10: error: PROCEDURE test (c: CARDINAL) ;
   31 |    test (VAL (REAL, c))
      |          ^~~~~~~~~~~~
val2.mod:31:10: error: testing

$ gm2 -g -c expression2.mod 
expression2.mod:24:6: error: assignment check caught mismatch between ‘i’ and 
expression
   24 |    i := j + k
      |      ^~~~~~~~
$ gm2 -g -c expression.mod 
expression.mod:24:11: error: expression of type ‘CARDINAL’ is incompatible with 
type ‘CHAR’
   24 |    i := j + k
      |         ~~^~~
expression.mod:24:11: error: ‘CARDINAL’ and ‘CHAR’ are incompatible in this 
context
expression.mod:24:11: error: expression of type ‘CARDINAL’ is incompatible with 
type ‘CHAR’

$ gm2 -g -c func.mod 
func.mod:32:22: error: expression of type ‘CARDINAL’ is incompatible with type 
‘REAL’
   32 |    c := test (1 + 2) + r ;
      |         ~~~~~~~~~~~~~^~~
func.mod:32:22: error: ‘CARDINAL’ and ‘REAL’ are incompatible in this context
func.mod:32:22: error: expression of type ‘CARDINAL’ is incompatible with type 
‘REAL’

more intrinsics need to be incorporated into the sub expressions errors,

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]