[aspectc-user] calls to template members not matched

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Sun Jan 7 15:53:31 CET 2007


Hi,

I'm sorry for causing your confusion. The problem is that STLSet simply
doesn't work as it should due to the parsing problems that you have
experienced. I get the same error messages.

It turned out that STLSet is not an *active* test program. It is not
listed in the ACTESTS variable in the Makefile in the tests directory.

This means that only STLString works.

Olaf

Panu Bloigu schrieb:
> Hello.
>
>> It might also help you to know that there are two ac++ test programs
>> that use the STL in the real-instances mode: one uses <string>, the
>>   
> ...
>> Does that work for you?
>
> I don't seem to be able to get even the test code to compile with
> --real-instances. What I have been trying to do is to go to the
> directory /AspectC++/tests/STLSet under the AspectC++ sources and
> issue the command
>
> ag++ --c_compiler g++ --keep_acc --real-instances -k -p ./ -c main.cc
> --Xcompiler -o main.o -D_useAC -O0 -g3 -Wall -fmessage-length=0
>
> The compiler gives me the following errors:
>
> main.cc:12: In instantiation of `set<int>':
> /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_set.h:130:
> In instantiation of `_Rb_tree<int,int,std::_Identity< int >,std::less<
> int >,std::allocator< int >>':
> /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:414:
> error: invalid member declaration near token `}'
> /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:435:
> error: invalid member declaration near token `}'
> /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_tree.h:397:
> error: expected a constant as argument 2
> error: Execution failed: "ac++" --config "puma.config" 
> --real-instances -k -p"./" -D"_useAC" -c "main.cc" -o "main.acc"
>
>
> Without --real-instances the compilation goes just fine, but the call
> to set<int>::insert(int) isn't matched. Also, the pointcut definition
> used to match the call seems odd to me:
>
> call ("% ...::%(...)" && !"% printf(...)")
>
> I have understood that to match a call to a template function the
> match expression should contain "<...>" or something similar somewhere
> in the expression.
>
> And then now follows a real mystery. The test code under
> /AspectC++/tests/STLString compiles prefectly with --real-instances
> AND the pointcut
>
> call ("% foo(... :: basic_string<char,...>)" && !"% printf(...)")
>
> is matched!
>
> I'm very confused. Could you please tell me what is going on here? I'm
> using gcc 4.1.1 on Fedora Core 6 with ac++ 1.0pre3.
>
> Thanks,
>
> Panu.
> _______________________________________________
> 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