Skip to content
Snippets Groups Projects
Commit e3764145 authored by Gaius Mulley's avatar Gaius Mulley
Browse files

PR modula2/117371: Add check for zero step in for loop


This patch is a follow on from PR modula2/117371 which could include
a check to enforce the ISO restriction on a zero for loop step.

gcc/m2/ChangeLog:

	PR modula2/117371
	* gm2-compiler/M2GenGCC.mod (PerformLastForIterator):
	Add check for zero step value and issue an error message.

gcc/testsuite/ChangeLog:

	PR modula2/117371
	* gm2/iso/fail/forloopbyzero.mod: New test.

Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
parent 70999668
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment