https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119821
Bug ID: 119821
Summary: FE (parser): CONFIGURATION SECTION rejects valid code
- empty paragraphs
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: ---
Given the following COBOL source:
program-id. empty.
environment division.
configuration section.
source-computer.
object-computer.
a compile complains about source-computer not specifying a name (but that's
optional):
empty.cob:5:4: error: syntax error, unexpected OBJECT COMPUTER, expecting NAME
5 | object-computer.
| ^
even worse if line 5 is commented out:
empty.cob:2:25: error: syntax error, unexpected end of file, expecting NAME
2 | environment division.
| ^
I gave adjusting the parser a quick try, but my change had no effect, so I'll
need to see once how this is done :-)