|
From: | Ron Norman |
Subject: | Re: [Bug-GnuCOBOL] Incorrect parsing of numeric-edited values |
Date: | Sat, 13 May 2017 07:54:31 -0400 |
Hi Edward,
I see GC is accepting the value. Just giving a warning which is reasonable.
Don't think we need to eliminate the warning, which will happen with this patch.
Maybe we need to proceed as with numeric, but to give a warning, at least with std=ibm or osvs
SK
On 5/13/17 6:55 AM, Edward Hart wrote:
Hi David,
Thanks for the bug report and patch. This is technically extension, but it's a very innocuous one and it's supported by Micro Focus (see VALUE Clause, General Rule 1.b). I'll commit this immediately.
Edward
On 13 May 2017 at 10:56, David Newall <address@hidden> wrote:
Hi all,
I believe it's bug:
address@hidden cat test-pic.cbl
IDENTIFICATION DIVISION.
PROGRAM-ID. TEST-PIC.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 N PIC .999 VALUE 0.
PROCEDURE DIVISION.
START-PROCEDURE SECTION.
000-TOP.
DISPLAY 'N:', N.
END PROGRAM TEST-PIC.
address@hidden cobc -x test-pic.cbl
test-pic.cbl: 6: warning: alphanumeric value is expected
If I'm right (about it being a bug), the problem is in typck.c; and because of the "TODO" comment, I think it's something that slipped through the cracks. I think NUMERIC-EDITED could be parsed the same as NUMERIC is.
I'm using r1560. I've attached my suggested patch.
Cheers,
David
[Prev in Thread] | Current Thread | [Next in Thread] |