[aspectc-user] template matching

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Tue Mar 22 11:00:25 CET 2005


Hi Tiago,

Tiago Rodrigues wrote:
> Hi,
> i know full template matching is a recently added functionality but i
> can't seam to put it to work.
> 
> my template matching advices get parsed but don't get applied to the templates.
> I know i'm supose to pass --real_instances to ag++ to get full
> template parsing but this option doesn't seam to be understood by
> ac++, here is what i get:
> 
> #: ag++ --real_instances some_source.cpp
> error: Execution failed: "ac++" --config "puma.config" 
> --real_instances -p. -c "teste.cpp" -o "teste.acc"
> 
> i 've seen someone talk about an alternative flag --real-instances but
> this one gets passed right to gcc
> 
> #: ag++ --real-instances some_source.cpp
> error: Execution failed: "g++"  --real-instances -E -dM -v -x c++
> "/dev/null" 2>.err.out 1>.std.out
> 
> what am i doing wrong?
> i have version 0.9.2, and gcc 3.4.3.
> any help would be apreciated.
> 
> thanks in advance,
> Tiago R.

this is a bug :-(. The ag++ option is called --real_instances, because 
all ag++ options that consist of more than one word use '_' as 
delimiter. ag++ should map this option to the internal ac++ option 
--real-instances. However, due to a misunderstanding of the developers 
--real_instances is passed unmodified to ac++, which causes an error.

As a workaround you can use ag++ to generate a parser configuration file:

ag++ --gen_config -o ac.cfg

Now add the line '--real-instances' to the configuration file.

Whenever you use ag++ additionally pass the '--config ac.cfg'.

Please note that the --real_instances/--real-instances option will 
probably become deprecated with the next AspectC++ release, because the 
'real-instances' parser mode will become the default and the old mode 
will no longer be maintained.

sorry for this problem.

Olaf



More information about the aspectc-user mailing list