[aspectc-user] Computed GOTOs?

aspectc at stefan-marr.de aspectc at stefan-marr.de
Wed Jun 11 21:17:35 CEST 2008


Hi Olaf,

many thanks :)
Works fine. But have had some problems with a previous SVN version to
compile r202.
After reverting to the last Debian package version compilation succeeded.

Thanks and kind regards
Stefan

> -----Original Message-----
> From: Olaf Spinczyk [mailto:os at aspectc.org]
> Sent: Wednesday, June 11, 2008 3:24 PM
> To: aspectc at stefan-marr.de
> Cc: aspectc-user at aspectc.org
> Subject: Re: [aspectc-user] Computed GOTOs?
> 
> 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