https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120804

            Bug ID: 120804
           Summary: FR: allow SET of numeric-display variables
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simonsobisch at gnu dot org
  Target Milestone: ---

test.cob: error: invalid SET Z-INT-ZAEHLER (FldNumericDisplay) TO _literaln_2
(FldLiteralN): not a field index
test.cob: error: invalid SET T05-IND (FldNumericBinary) TO _literaln_60
(FldLiteralN): not a field index

the code

              SET Z-INT-ZAEHLER UP BY 1
              SET Z-GES-ZAEHLER UP BY 1.

compiles,

              SET Z-INT-ZAEHLER TO 0
              SET T05-IND TO 40.

doesn't.

I think that according to ISO neither should compile, but with -std=mf/gnu this
may go through with a warning.

Also note that the literal should be printed in the message, instead of its
literal-id.

Reply via email to