bug-gnucobol
[Top][All Lists]
Advanced

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

Re: [Bug-GnuCOBOL] Abortion on undeclared vars: IF U1 = 1 and U2 = 2 or


From: Edward Hart
Subject: Re: [Bug-GnuCOBOL] Abortion on undeclared vars: IF U1 = 1 and U2 = 2 or U1 = 2 and U2 = 1
Date: Thu, 6 Jul 2017 14:51:22 +0100

Hi Harald,

Thanks to Ron and Simon, as of r1755, this bug no longer occurs and we have better error messages:

./test.cob: in paragraph 'main':
./test.cob: 8: error: 'V1' is not defined
./test.cob: 8: error: 'V2' is not defined
./test.cob: 9: error: 'V1' is not defined
./test.cob: 9: error: 'V2' is not defined
./test.cob: 10: error: invalid _expression_
./test.cob: 8: error: invalid _expression_
./test.cob: 10: error: invalid _expression_
./test.cob: 10: error: invalid _expression_

Edward

On 6 July 2017 at 14:02, Harald Cordes | ITGAIN <address@hidden> wrote:

Hi,

 

I’ve found another abortion error in a syntactically wrong program,

originally caused by a missing copy.

Please have a look if a better error msg can be printed.

Hint: Simplifying the relational expressing will solve the abortion

 

       IDENTIFICATION DIVISION.

       PROGRAM-ID.  DK0100.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

      * variables intentionally not declared for provoking the abortion

       PROCEDURE DIVISION.

       main.

           IF  V1 = 1 AND V2 = 2 OR

               V1 = 2 AND V2 = 1

           THEN

               display "Hello"

           END-IF.

 

A2.cbl: in paragraph 'main':

A2.cbl: 8: error: 'V1' is not defined

A2.cbl: 8: error: 'V2' is not defined

A2.cbl: 9: error: 'V1' is not defined

A2.cbl: 9: error: 'V2' is not defined

A2.cbl: 10: error: invalid _expression_

cobc: unexpected operator: 0

cobc: tree.c: 3498: internal compiler error

cobc: aborting compile of A2.cbl at line 10

 

for compiler version see my postings of Jun 09th 2017

 

 

with by best regards

   Harald



reply via email to

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