[aspectc-user] Computed GOTOs?
Olaf Spinczyk
os at aspectc.org
Wed Jun 11 15:23:45 CEST 2008
Hi Stefan,
I have implemented the "labels as values" gcc extension in Puma. If you
build a new ac++ binary from our subversion repository, you can weave
code that contains computed gotos (such as your example code).
Best regards,
Olaf
aspectc at stefan-marr.de wrote:
> Hello,
>
> is it possible to get computed gotos for AspectC++?
>
> At the moment the compiler does not like label definitions like "L1:" and
> the goto statement "goto *label1;".
> Ok, there are probably issues with gotos and AOP in general, but since I use
> only very basic advices and the code which needs computed gotos for
> performance reasons is cleanly separated, it would be nice to be able to use
> them.
>
> Kind Regards
> Stefan Marr
>
> == Example Code for Computed Gotos ==
>
>
> #include <stdio.h>
>
> // build with
> // g++ test.c succeeds
> // ag++ test.c fails
>
> int main(int argc, char** argv) {
> printf("Test for computed gotos.\n");
>
> L1:
>
> void* label1 = &&L1;
> printf(".");
> goto *label1;
> }
>
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
>
>
More information about the aspectc-user
mailing list