[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Bug in GnuCOBOL 1.1: reporting undefined paragraph
From: |
Scott McKellar |
Subject: |
[open-cobol-list] Bug in GnuCOBOL 1.1: reporting undefined paragraph |
Date: |
Mon, 24 Nov 2014 08:49:08 -0800 |
When I PERFORM an undefined paragraph (probably because I mistyped the
paragraph name, GnuCOBOL 1.1 reports my blunder, naturally. However it
attributes the error to the last paragraph in the program, not to the paragraph
where the error actually occurs.
Consider the following minimal example:
IDENTIFICATION DIVISION.
PROGRAM-ID. badperform.
PROCEDURE DIVISION.
0000-mainline.
perform 1000-begin-job.
perform 2000-do-stuff. *> misspelled
perform 3000-shut-down.
STOP RUN.
1000-begin-job.
display 'I am starting up'.
2000-do-some-stuff.
display 'I am doing stuff'.
3000-shut-down.
display 'I am shutting down now'.
>cobc -x -Wall badperform.cob
badperform.cob: In paragraph '3000-shut-down':
badperform.cob:8: Error: '2000-do-stuff' undefined
The error should have been attributed to 0000-mainline, not to 3000-shut-down.
If GnuCOBOL can't keep track of where the error occurs, it shouldn't attribute
it to any particular location; that's just needlessly misleading.
Environment: Red Hat 4.1.2. I have not tried GnuCOBOL 2.0; maybe it behaves
better in this regard.
Scott McKellar
- [open-cobol-list] Bug in GnuCOBOL 1.1: reporting undefined paragraph,
Scott McKellar <=