Skip to content

det: a fixed-form inline comment (*>) inside a condition becomes a hole, or crashes after NOT #4874

Closed

Description

@squid-protocol

Found while fixing #4682 (PR #4872).

In fixed-format source, an inline comment *> inside a condition breaks the det translator:

           IF D0 < 3 *> hi
               DISPLAY 'Y'
           END-IF

becomes a statement hole (with or without NOT), and

           IF D0 NOT *> c
               < 3

crashes the program ("the PROCEDURE DIVISION does not parse at line N") instead of translating or refusing by name.

Expected (IBM): a floating comment indicator *> starts a comment to the end of the line; Enterprise COBOL 6 accepts it in fixed form. GnuCOBOL (-std=ibm) compiles both. So: translated, with the comment ignored, or refused by name (#4411). Never a crash, never a silent hole.

Acceptance: tests for *> after a condition, between NOT and its operator, inside EVALUATE WHEN / PERFORM UNTIL, and inside a string literal (where it is NOT a comment); the whole input class (owner rule: a translator fix covers its class).

Part of #4270.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    legacy-modernization
    on Oct 11, 2026
  2. added
    scope:sweep
    era:2
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugera:2legacy-modernizationpriority: mediumscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions