On Sat, Mar 12, 2016 at 10:58:42AM -0700, [email protected] wrote: > The bug caused me to push bad code to gawk's repo. It's only luck that it > wasn't noticed, but a bug is a bug.
So you have personal feelings towards that bug. I'd never use TinyCC for serious development. There are simply not enough testers. > The issue isn't just the lack of diagnostic - what kind of erroneous > code is being generated in this case? Let's see what the final C11 draft (N1570) says about this issue: Section 6.8.4.2 paragraph 3: The expression of each case label shall be an integer constant expression and no two of the case constant expressions in the same switch statement shall have the same value after conversion. Section 4 paragraph 2: If a "shall" or "shall not" requirement that appears outside of a constraint or runtime-constraint is violated, the behavior is undefined. There you read it, C11 allows us to generate whatever we want. Regarding the cost of your solution, a tree structure might be faster and could also be implemented in a way that handles value ranges. Best regards, Daniel _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
