]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/117948: Forward procedure declaration should only be available in ISO
authorGaius Mulley <gaiusmod2@gmail.com>
Sat, 7 Dec 2024 14:04:44 +0000 (14:04 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Sat, 7 Dec 2024 14:04:44 +0000 (14:04 +0000)
commit41800372146f5ad15a8796b37f54965f78cc14fb
tree29c44fb06d48cb6acec18c662a23a393266f8857
parent4abcf4ad38a4081f02ed09aed7892a3a6af61cbb
PR modula2/117948: Forward procedure declaration should only be available in ISO

This patch restricts the forward procedure declaration to the ISO dialect.

gcc/m2/ChangeLog:

PR modula2/117948
* gm2-compiler/P1Build.bnf (ForwardDeclaration): Pass token
position of the FORWARD keyword to EndBuildForward.
* gm2-compiler/P1SymBuild.def (EndBuildForward): New parameter
forwardPos.
* gm2-compiler/P1SymBuild.mod (EndBuildForward): Issue an error at
forwardPos if the Iso boolean is false.

gcc/testsuite/ChangeLog:

PR modula2/117948
* gm2/pim/fail/forward.mod: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/P1Build.bnf
gcc/m2/gm2-compiler/P1SymBuild.def
gcc/m2/gm2-compiler/P1SymBuild.mod
gcc/testsuite/gm2/pim/fail/forward.mod [new file with mode: 0644]