diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2025-07-29 09:09:58 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2025-07-29 09:09:58 +0100 |
commit | e79e0fe2b1f101485e5e63e674e133692a3a0cb4 (patch) | |
tree | 13315771457ca7e1c84ce6692f312fcdfa5d66f1 /gcc/jit | |
parent | 5f022a75b63b79294650f18e81d32352bf55d18e (diff) | |
download | gcc-e79e0fe2b1f101485e5e63e674e133692a3a0cb4.zip gcc-e79e0fe2b1f101485e5e63e674e133692a3a0cb4.tar.gz gcc-e79e0fe2b1f101485e5e63e674e133692a3a0cb4.tar.bz2 |
PR modula2/121289 Poor warning location when using Wstyle option
This patch adds a token location parameter to CheckVariableAgainstKeyword
and dependants ensuring that the warning is generated from the
token associated with the variable rather than the end of the statement.
gcc/m2/ChangeLog:
PR modula2/121289
* gm2-compiler/M2Students.def (CheckVariableAgainstKeyword): New
parameter tok.
* gm2-compiler/M2Students.mod (CheckVariableAgainstKeyword): New
parameter tok.
Pass tok to PerformVariableKeywordCheck.
(PerformVariableKeywordCheck): New parameter tok.
Pass tok to MetaErrorStringT0.
* gm2-compiler/P2SymBuild.mod (BuildVariable): Pass tok to
CheckVariableAgainstKeyword.
* gm2-libs-iso/LowLong.mod (except): Replace with ...
(exceptSrc): ... this.
* gm2-libs-iso/LowReal.mod (except): Replace with ...
(exceptSrc): ... this.
* gm2-libs-iso/LowShort.mod (except): Replace with ...
(exceptSrc): ... this.
* gm2-libs-iso/Processes.mod (Wait): Replace from with fromCor.
* gm2-libs-iso/RndFile.mod (EndPos): Replace end with endP.
* gm2-libs/SCmdArgs.mod (GetArg): Replace start with startPos.
Replace end with endPos.
(NArg): Replace start with startPos.
Replace end with endPos.
gcc/testsuite/ChangeLog:
PR modula2/121289
* gm2/warnings/style/fail/badvarname.mod: New test.
* gm2/warnings/style/fail/warnings-style-fail.exp: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/jit')
0 files changed, 0 insertions, 0 deletions