[Bug cobol/119256] Capture source ranges for tokens in gcobol
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119256 Simon Sobisch changed: What|Removed |Added CC||simonsobisch at gnu dot org --- Comment #5 from Simon Sobisch --- Yes, the range is off by one. @jklowden: Is there any reason to not merge the range part in?
[Bug cobol/119256] Capture source ranges for tokens in gcobol
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119256 --- Comment #4 from David Malcolm --- James, I see you closed this as WONTFIX; was that just for the trailing "." issue mentioned in comment #2, or for the whole idea? I thought you were keen on having ranges rather than points.
[Bug cobol/119256] Capture source ranges for tokens in gcobol
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119256 James K. Lowden changed: What|Removed |Added Status|WAITING |RESOLVED CC||jklowden at gcc dot gnu.org Resolution|--- |WONTFIX --- Comment #3 from James K. Lowden --- The source range is indicated as designed. The dot in PROGRAM-ID. is specified as an optional part of the syntax. In the ISO spec under "8.3.5 Separators", it says: "3) The COBOL character period, when followed by a space, is a separator. The separator period shall be used only to indicate the end of a sentence, or as shown in formats." This is a "shown in format" case. Granted, it's debatable whether or not "an optional part of the syntax" is part of the error. Variations in input will provoke slightly different messages. But the user is not confused, and the diagnostic is not malformed.
[Bug cobol/119256] Capture source ranges for tokens in gcobol
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119256 --- Comment #2 from David Malcolm --- BTW, should the source range be: hello.cob:2:8: error: syntax error, unexpected NAME, expecting FUNCTION or PROGRAM-ID 2 |porgram-id. hello. |^~ rather than: hello.cob:2:8: error: syntax error, unexpected NAME, expecting FUNCTION or PROGRAM-ID 2 |porgram-id. hello. |^~~ ? I think there might be an off-by-one in loc.last_column.
[Bug cobol/119256] Capture source ranges for tokens in gcobol
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119256 David Malcolm changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |dmalcolm at gcc dot gnu.org Status|UNCONFIRMED |WAITING Last reconfirmed||2025-03-13 Ever confirmed|0 |1 URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma |il/gcc-patches/2025-March/6 |il/gcc-patches/2025-March/6 |77314.html |77481.html --- Comment #1 from David Malcolm --- Updated patch posted here: https://gcc.gnu.org/pipermail/gcc-patches/2025-March/677481.html