https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119633
Bug ID: 119633 Summary: compile error for debug-module USE FOR DEBUGGING Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: cobol Assignee: unassigned at gcc dot gnu.org Reporter: simonsobisch at gnu dot org Target Milestone: --- As shown in NIST DB303M DB303M.CBL:33:37: error: syntax error, unexpected NAME, expecting PROCEDURES 33 | 003300 USE FOR DEBUGGING ON ALL REFERENCES OF FREC. DB3034.2 | ^ DB303M.CBL:33:8: error: missing END DECLARATIVES or SECTION name 33 | 003300 USE FOR DEBUGGING ON ALL REFERENCES OF FREC. DB3034.2 | ^ cobol1: error: failed compiling DB303M.CBL If it _should_ work (the feature was already obsolete in COBOL85 and dropped with COBOL2002), then the parser needs to be updated. If the feature is not planned to be supported, then the parser should consume and warn/error. If that specific test should be passed then gcobol needs an option to flag obsolete and archaic items (ideally for COBOL85, for COBOL2002, ...). I suggest to fix the parser error via this bug report, then open a new one with the decision which way further to take (things like flagging obsolete per standard can definitely be added with a later release, a possible implementation of that feature as well).