Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-format does not result in warnings on area A #395

Open
GitMensch opened this issue Jan 23, 2025 · 0 comments
Open

source-format does not result in warnings on area A #395

GitMensch opened this issue Jan 23, 2025 · 0 comments

Comments

@GitMensch
Copy link
Contributor

GitMensch commented Jan 23, 2025

given

        identification      division.
        program-id.         prog.
        data                division.
        working-storage     section.
        01 item pic x(64)   value "abXcdeX".
        01 counter pic 999  value zero.
        procedure division.
        inspect item tallying
                counter for characters 
                after  "X" 
                before "X"
        display  counter.

I get no warnings, even if dialect::"ibm-strict" is configured globally (with sourceformat:"auto", which in this case should be the same as sourceformat:"cobol85" - but setting it explicit does not make a difference either).

Doing the same with IBM extensions I get hard errors like:

The INSPECT statement must begin in Area B.

similar to what the IBM compiler outputs:

IGYPS0009-E "INSPECT" should not begin in area "A". It was processed as if found in area "B"

similar to what cobc -std=ibm-strict outputs:

inspect.cob:8: error: start of statement in Area A

This issue may needs to be split into two, if "auto" is not adjusted according to the dialect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant