bug-gnucobol
[Top][All Lists]
Advanced

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

Re: [Bug-GnuCOBOL] Incorrect parsing of numeric-edited values


From: Sergey Kashyrin
Subject: Re: [Bug-GnuCOBOL] Incorrect parsing of numeric-edited values
Date: Sat, 13 May 2017 06:54:50 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0


Hmmm. Not sure it is a bug.

ska 73> cob2 -x pic3.cbl
 PP 5655-W32 IBM Enterprise COBOL for z/OS  5.2.0 in progress ...
 LineID  Message code  Message text
      2  IGYDS0020-W   Name "TEST-PIC" was processed as "TEST0PIC".
                       Same message on line:     13
6 IGYGR1080-S A "VALUE" clause literal was not compatible with the data category of the subject data item. The "VALUE" clause
                       was discarded.
9 IGYPS2010-E Procedure-name "START-PROCEDURE" was found in area "B" followed by a period or section. The procedure-name was
                       processed as if found in area "A".
Messages Total Informational Warning Error Severe Terminating
 Printed:       4                          2 1         1
 End of compilation 1,  program TEST0PIC,  highest severity 12.
 Return code 12

Regards,
SK

On 5/13/2017 5:56 AM, David Newall 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





reply via email to

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