Landing: 366ebd458e5b
Project / Subsystem
gcc / cobol
Date
2026-08-03
Author
James K. Lowden
Commit
366ebd458e5baec989e171360be4692153a59da6
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- cobol
- patch_id
- —
- commit_hash
- 366ebd458e5baec989e171360be4692153a59da6
- source_type
- github
- headline
- Ignore COBOL comments within string literals
- tldr
- Fixes COBOL lexer to not treat '*>' as comments inside string constants.
- author
- James K. Lowden
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • cobol
- • lexer
- • comment
- • compiler
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-03T00:00:00.000Z
This commit updates the COBOL compiler’s lexer to correctly handle comments within string literals. Previously, the lexer would incorrectly interpret the sequence ’*>’ as an inline comment even if it appeared inside a quoted string. The fix introduces a new function, skip_quoted_literal, to properly recognize string constants and ensures that inline comments are only processed when they appear outside of these strings. This prevents erroneous parsing of COBOL source code.