About Me‎ > ‎Projects‎ > ‎

GCC Limitations

posted Jul 20, 2010, 1:05 AM by Tim Rodriguez   [ updated Jul 20, 2010, 1:25 AM ]
1) No __attribute__ ((selectany)) support for non-Microsoft targets. While this isn't a necessity for Cake, it will remove the hassle of multiply-included templates, and simplify the use of Tuples.

2) No declarations of the form int i, long j.  Inclusion of this into the grammar as an extension would allow more than one variable to be declared for the scope of a for-loop, reducing overhead for things like $foreach and $map.

3) __builtin_choose_expr(x,y,z) currently will only evaluate either y or z for side-effects (based on the statically-decidable expression x), but at the moment will generate syntax errors for both y AND z. If it did not generate syntax errors, it would allow for greater flexibility of functions without defining nearly identical clones.

4) Minor inconvenience, but easily worked around: __builtin_classify_type(x) currently classifies arrays and pointers as the same thing although each have their own designated category.

    Cake and the developers who use it will benefit greatly from improving 1-3. I'm considering tinkering in the GCC source and patching them myself, because I imagine that these aren't exactly the highest priority fixes for the GCC team.