Stefan Behnel wrote: > the current generator CEP proposes to use computed goto's, as described > here, for example: > > http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Labels-as-Values.html > > However, from a web search, it seems that they are not a standard C feature > and therefore not completely portable, which is the reasons why CPython 3.1 > only enables their use optionally for the interpreter core (ceval). Here is > an example for a compiler that doesn't seem to support them: > > http://code.google.com/p/unladen-swallow/issues/detail?id=22 > > It's one thing to provide a build time option for a performance enhancement > (as CPython 3.1 does), but it's a different beast to make a language > feature depend on a non-standard compiler feature (as the CEP suggests). > > I wasn't able to find a list of compilers that support this, so I can't say > how many compilers we'd lock out. Any ideas? Pointers? Opinions?
Computed gotos are only available with some compilers. As far as I remember they are supported by recent versions of GCC (IIRC 3.x and newer), Intel's ICC and Sun's C compiler. MSVC doesn't have it for sure and will probably never support, it since Microsoft is focusing on C# rather than extending its C/C++ compiler. Antoine Pitrou has lead the implementation in Python 3.1. He might know more details. I've included him in CC. Christian _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
