Euphoria Ticket #191: nested elsifdef incorrect

A nested elsifdef can be incorrectly evaluated. Added the following test to t_ifdef.e:

with define ABC 
with define DEF 
 
ifdef XYZ then 
	test_fail( "XYZ not defined") 
	ifdef UVW then 
		test_fail( "nested UVW not defined" ) 
	elsifdef ABC then 
		test_fail( "nested ifdef true elsifdef clause should never be evaluated" ) 
	end ifdef 
end ifdef 

The elsifdef ABC then is part of the nested ifdef, but is evaluated as part of the top level.

This bug also causes t_platform.e to fail on non-Windows platforms.

Details

Type: Bug Report Severity: Major Category: Interpreter
Assigned To: mattlewis Status: Fixed Reported Release: 3357
Fixed in SVN #: 3364 View VCS: 3364 Milestone:

1. Comment by mattlewis Aug 18, 2010

I haven't fully grokked the ifdef part of the parser, but it looks like it doesn't track nested dead ifdef segments correctly.

2. Comment by mattlewis Aug 18, 2010

Correctly detects elsifdefs inside dead ifdef blocks.

Search



Quick Links

User menu

Not signed in.

Misc Menu