Euphoria Ticket #961: include memstruct as BYTE silent exit

working with one of the win32/demo programs converted to memstruct. if I define BYTE locally it works ok with or without also including std/memstruct/windows.e which probably should error from multiple definitions?

if the BYTE definition comes only from std/memstruct/windows.e then a silent exit

ifdef BUG then 
	include std/memstruct/windows.e  --some predefined structs 
	public memtype char as BYTE 
end ifdef 
memstruct MESSAGE 
	BYTE rgbReserved[40] 
end memstruct 

eui source/eui.ex bug.ex gives some more information

\Eu41mingw\source\memstruct.e:671 in function calculate_padding() 
type_check failure, mem_size is 0.025 
... called from \Eu41mingw\source\memstruct.e:757 in function calculate 
... called from \Eu41mingw\source\memstruct.e:561 in function recalcula 
... called from \Eu41mingw\source\fwdref.e:459 in procedure patch_forwa 
... called from \Eu41mingw\source\fwdref.e:1110 in function resolve_fil 
... called from \Eu41mingw\source\fwdref.e:1167 in procedure Resolve_fo 
... called from \Eu41mingw\source\scanner.e:946 in function IncludePop( 
... called from \Eu41mingw\source\parser.e:5096 in procedure real_parse 
... called from \Eu41mingw\source\parser.e:5239 in procedure parser() 
... called from \Eu41mingw\source\main.e:201 in procedure main() 
... called from \Eu41mingw\source\main.e:228 
\Eu41mingw\source\memstruct.e:671 in function calculate_padding()  
type_check failure, mem_size is 0.025  
    member_sym = 3839 
    size = 0 
    mem_size = 0.025 
    padding = 0 
    r = 0 
    alignment = 0 
... called from \Eu41mingw\source\memstruct.e:757 in function calculate_size()   
    member_sym = 3839 
    was_union = 0 
    current_pack = 0 
    size = 0 
    indeterminate = 0 
    mem_size = 1 
    struct_type = <no value> 

I think this is the latest version Euphoria Interpreter v4.1.0 development 32-bit Windows 2015-02-13 18:10:12, Id: 6323:1c30095180a0


Type: Bug Report Severity: Normal Category: Error Reporting
Assigned To: unknown Status: New Reported Release: memstruct 1c30095180a0
Fixed in SVN #: View VCS: none Milestone:


Quick Links

User menu

Not signed in.

Misc Menu