|
From: | David Newall |
Subject: | [Bug-GnuCOBOL] Incorrect parsing of numeric-edited values |
Date: | Sat, 13 May 2017 19:26:49 +0930 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
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
numeric-edited.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |