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

modula2: Narrow subranges to int or unsigned int if ZTYPE is the base type.


This patch narrows the subrange base type to INTEGER or CARDINAL
providing the range is satisfied.  It only does this when the subrange
base type is the ZTYPE.

gcc/m2/ChangeLog:

	* gm2-compiler/M2GCCDeclare.mod (DeclareSubrange): Check
	the base type of the subrange against the ZTYPE and call
	DeclareSubrangeNarrow if necessary.
	(DeclareSubrangeNarrow): New procedure function.

Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
parent 5ef248c1
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