Sergey Korshunoff <[email protected]>: > > Is this worth fixing? Or just document it as a limitation? > I think this is very important. Don't using VLA and signal handler's > at the same time is not acceptable. But what the ways?
Firstly, don't commit any code until a plan has been agreed... Then, I can see a lot of options: 1. Accept the limitations of the current implementation. I think this is probably the best plan. 2. Reset the SP at every label, making the generated code uglier even when the source code contains no VLAs. 3. Like 2, but only do it if VLAs have been enabled with a command-line option. 4. Like 2, but have a command-line option to disable VLAs. 5. Complicate the implementation significantly, because at the very least you have to record for each label whether the code at that label resets the SP. And there are a lot of suboptions here, depending on how you want to balance complexity of the implementation with ugliness of the generated code. Whatever suboption is chosen, if you take this route the first thing to implement would be a comprehensive test suite because there will probably be nasty interactions with computed gotos and switch statements that are not adequately tested by the current tests. _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
