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

James K. Lowden <jklowden at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jklowden at gcc dot 
gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2026-05-19

--- Comment #5 from James K. Lowden <jklowden at gcc dot gnu.org> ---
(In reply to Simon Sobisch from comment #0)
> test.cob: error: invalid SET Z-INT-ZAEHLER (FldNumericDisplay) TO
> _literaln_2 (FldLiteralN): not a field index
...
> 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.

Yes, this is handled inconsistently.  If the field is not an index, under ISO
it cannot be a SET target for TO or UP/DOWN.

Reply via email to