consider the following source:
IDENTIFICATION DIVISION. CHECKBOOL.
PROGRAM-ID. CHECKBOOL.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 VAR1 PIC X(16) VALUE "#0001".
01 VAR2 PIC X(16) VALUE "#0002".
01 VAR3 PIC X(16) VALUE "#0003".
01 VAR4 PIC X(16) VALUE "#0004".
PROCEDURE DIVISION.
MAIN-PROGRAM SECTION.
INIZIO.
IF VAR1 NOT = (VAR2 AND VAR3 AND VAR4)
DISPLAY "TRUE" UPON STDERR
ELSE
DISPLAY "FALSE" UPON STDERR
END-IF
GOBACK.
Compiling with GC3.1.2 is error-free and program execution is correct (display TRUE).
Compiling with gc3.2 gives the following error:
INIZIO.
IF VAR1 NOT = (VAR2 AND VAR3 AND VAR4)
error: invalid expression
DISPLAY ...........
Bugs: #875
Discussion: compile error: picture clause required for 'ch-9'
Hi Rocco
I think it's a bug in the condition parsing that is not related to boolean .
The same error is occurring with this program (pic 9 fields) :
Diff:
Possibly the same reason (or not, but then still related) that the following bad code compiles:
fixed by [r5093]
Related
Commit: [r5093]