[aspectc-user] AC++ --aspect_header and -p problems

Olaf Spinczyk os at aspectc.org
Fri Apr 15 12:56:37 CEST 2011


Hi!

It is intended but (obviously) not sufficiently documented. The main 
reason for having a -p option is to distinguish between files ac++ is 
allowed to transform (project files) and files that must remain 
untouched (all the rest, e.h. system header files). As aspect headers 
have to be transformed, they have to be located in a directory tree, 
which is provides by a -p option. The -a option mainly disables the 
automatic search for all *.ah in the project.

Best regards,

Olaf


On 04/15/2011 12:50 PM, Guilherme . wrote:
> Hi!
>
> Although not stated in the documentation it seems that an aspect
> header MUST be in a path provided by the -p option even when using the
> --aspect_header option. This seems to be a bug (or at least missing in
> the documentation). To reproduce this do following
>
> touch simple_aspect.ah
> echo -ne aspect simple_aspect{\\n}\;>  simple_aspect.ah
> mkdir source
> echo -ne int main\(int,char**\){\\nreturn 0\;\\n}>  source/main.cpp
> cd source
> ag++ -c main.cpp -a ../simple_aspect.ah -p .
>
> This should produce the message:
>
> ../simple_aspect.ah:1: error: invalid declaration near token `simple_aspect'
> error: Execution failed: "ac++" --config "/tmp/agxx_pcfgCp4qEU"  -a
> "../simple_aspect.ah"  -p "."  -c "main.cpp" -o
> "/tmp/main.cpp_agxx_I3Nle8"
>
> whereas
>
> ag++ -c main.cpp -a ../simple_aspect.ah -p ..
>
> works perfectly.
>
> Is this a bug or intended (but undocumented behaviour)?
>
> Greetings,
> Guiherme
> _______________________________________________
> 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