]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/120253: Error message column numbers should start at 1 not 0
authorGaius Mulley <gaiusmod2@gmail.com>
Tue, 13 May 2025 21:54:33 +0000 (22:54 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Tue, 13 May 2025 21:54:33 +0000 (22:54 +0100)
commit9a485b83e177cb742be17faf20ac5cc7db14fee3
tree241e4f6aeca2fee1206e1baf23c472b569d59508
parenteaee2df409ae40ab4a0c557839d6f64b9c6b936d
PR modula2/120253: Error message column numbers should start at 1 not 0

This patch ensures that column numbers start at 1 rather than 0.

gcc/m2/ChangeLog:

PR modula2/120253
* m2.flex (FIRST_COLUMN): New define.
(updatepos): Remove commented code.
(consumeLine): Assign column to FIRST_COLUMN.
(initLine): Ditto.
(m2flex_GetColumnNo): Return FIRST_COLUMN if currentLine is NULL.
(m2flex_GetLineNo): Rewrite for positive logic.
(m2flex_GetLocation): Ditto.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/m2.flex