From: Philipp K. K. <pk...@sp...> - 2010-01-17 15:22:18
|
IMO the single most requested sdcc feature is support for aggregates - assignment, use as parameter and return value. This is quite understandable, since its a common standard C feature, used all over existing code, and is often used by automatically generated code. While there are workarounds (pass parameter as pointer, use memcpy instead of assignment, etc), having to make changes all over exisitng standard-conforming code is annoying. Maybe we should look into supporting this for the sdcc 3 release? There's three parts to this: Assignment - just turn them into memcpy calls. Parameters - just pass them on the stack as any other parameter. Return value - I have no idea. Unfortunately I don't know enough about sdcc outside of the Z80 port to implement this. For reference, here's some open RFEs I noticed when having a quick look at the tracker (and most have been closed as redundant (or rejected when posted as bug report) a long time ago): #674638 - structures cannot be passed as function parameters #1565724 - ISO C 89 function missing: div() #1710546 - struct: aggregate assignment #2324196 - (c99) support assign value to struct variable I'd like to put these on the sdcc 3 release wiki page, but I hesitate, since it's highly unlikely that I would be able to implement them. Should we try to improve struct support for the upcoming release? Philipp |