[Top][All Lists]

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

[open-cobol-list] COMP(-5) Problem

From: Roger While
Subject: [open-cobol-list] COMP(-5) Problem
Date: Thu Nov 18 23:49:04 2004

We have a problem with binary-trunc=no (std=mvs,mf)
01   ABC PIC 9(4) COMP  VALUE 12345.

This is quite legal.
This produces the warning -
"value size exceeds data size".
The warning is fairly easy to tackle in typeck.c
(We need a table of max signed/unsigned values for binary types)

The problem is that the value is truncated at run-time when
using the field. eg. in a MOVE.
Seems to be that in move.c, the MOVE is getting pushed through
"indirect_move" with a parameter of src->attr_digits; in this case 4.
(At about line 661)

Ideas ?
Can't be as simple as replacing the param with 20 or ?


reply via email to

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