gnu/gcc/64f2dcffc34274ac9877630d33d776745952a90a cobol: Show location for invalid arg in CALL
Previously, in such situation gcobol would print the location for the
PROCEDURE DIVISION where the mismatch occurred, rather than the actual
location of the invalid argument. For example:
Before:
argloc.cbl:8:55: error: parameter 2 BY VALUE ‘0’ (NUMERIC LITERAL, capacity 1, unsigned) invalid for ‘foo’ parameter BY REFERENCE ‘param-b’ (COMPUTATIONAL-5, capacity 4, signed)
8 | procedure division using param-a by reference param-b.
| ^~~~~~~~
Now:
argloc.cbl:18:37: error: parameter 2 BY VALUE ‘0’ (NUMERIC LITERAL, capacity 1, unsigned) invalid for ‘foo’ parameter BY REFERENCE ‘param-b’ (COMPUTATIONAL-5, capacity 4, signed)
18 | by value 0.
| ^~
gcc/cobol/ChangeLog:
* parse.y: Show location for invalid arg in CALL.
1 file changed