[aspectc-user] bug in trunk: iterators in .h

Olaf Spinczyk os at aspectc.org
Fri Feb 27 12:21:25 CET 2009


Hi Leandro,

thank you for your patience. The problem, which you described below, has 
been solved. AspectC++ has a new language feature that was introduced 
after the 1.0pre3 release. This feature was responsible for the 
generation of the <typeinfo> code. However, due to a parser bug in the 
Puma library  the code couldn't be parsed by ac++ itself. :-(

In order to solve the problem, the new feature is now only enabled if 
you use the command line option --introspection *and* the bug in Puma 
was fixed. This means that your code should work now regardless whether 
you use --introspection or not (with the latest version from the 
subversion repository).

Regarding the two other bugs you reported, Matthias will send you a 
reply at the week-end. Both can still be reproduced, but they might be 
symptoms of a bug which is likely to be fixed very soon.

Best regards,

Olaf

Leandro Costa wrote:
> If I declare an iterator in a .h file like:
>
> *list<char>::iterator it;*
>
> it happens:
>
> #> ag++ -c C.cc -a Tester.ah
> <typeinfo>:2: error: invalid member declaration near token `<'
> <typeinfo>:2: located in the following non-file unit:
> public:
>   typedef AC::TL<int,AC::TL<std::vector< int 
> >,AC::TL<std::_List_iterator< _Tp,_Tp,_Tp * >,AC::TL<std::list< char 
> >,AC::TLE > > > > __AttrTypes;
>   const char *__attr_name (unsigned i) const {
>     static const char *names[] = { "i", "iVec", "it", "it" }; return 
> names[i];
>   }
>   void *__attr (unsigned __i) const {
>     switch (__i) { case 0: return (void*)&i; case 2: return 
> (void*)&iVec; case 4: return (void*)⁢ case 6: return (void*)⁢ 
> default: return 0; }
>   }
> error: Execution failed: "ac++" --config "/tmp/agxx_pcfgwwUXeq"  -a 
> "Tester.ah"  -p. -c "C.cc" -o "/tmp/C.cc_agxx_KuDXwb"
>
> Use types is a workaround:
>
> *typedef list<char> cList;
> typedef cList::iterator cListIt;
> cListIt it;*
>
> It doesn't happen in ac-1.0pre3 version.
>
> []'s
>
> -- 
> _____________________________________________
>
>                       Leandro Souza Costa
>
> "A vitória se encastela em jardins encantadores,
>  mas para se chegar a ela não há caminho de flores"
> _____________________________________________
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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