[aspectc-user] Announcement of AspectC++ 1.0pre2

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Thu Dec 22 09:31:50 CET 2005


Hi Dimple,

this warning is a new feature of the 1.0pre2 version. It indicates that 
ac++ would have to transform code that is generated by a macro in order 
to weave some aspect code. However, ac++ can't transform macro-generated 
code, yet. This feature still has to be implemented.

In earlier versions such problematic transformations were either 
silently ignored or there was a strange error message like 
"CPP_MOVE_MANIPULATOR ... (anonymous unit:3)" and the whole translation 
unit was not transformed. The current situation is much better, because 
it gives you a chance to find the reason for the warning and to avoid 
the problem. In the future we also want to support automatic (on demand) 
or complete macro-expansion.

In the case of ACE the situation is a bit different. The macro 
ACE_ALLOC_HOOK_DECLARE (defined in config-lite.h) is (as far as I 
understand the code) expanded to an empty dummy struct ("struct __Ace 
{}"). In the new ac++ version friend declarations for all aspects are 
inserted not only into all classes of the project, but also into all 
structs. Therefore, this struct is also manipulated. This leads to the 
warning. I hadn't recognized this problem earlier, because in my tests I 
used an aspect that defines advice for *all* calls to virtual functions 
within ACE and I assumed that the warnings simply indicate such calls 
located within macro-generated functions. This assumption was wrong.

In general, ac++ should avoid unnessary transformations. In the case of 
struct __Ace the transformation is unnessary, because it does not 
contain any non-public elements. I think that the warnings could be 
avoided if we check this property of a struct. Meanwhile you could, as a 
workaround, try to replace "struct __Ace {}" in config-lite.h with 
"struct __Ace".

Does that help?

- Olaf


Dimple wrote:
> Hi Olaf,
> When I was using aspectc++ 1.0pre1 release, I was not getting any warning
> messages. But I tried to use latest release 1.0pre2 to build ACE. It is
> giving my countless warning messages like:
> 
> "warning: transformation within macro 'ACE_ALLOC_HOOK_DECLARE'
> ../ace/Reactor.h:820: warning: transformation within macro
> 'ACE_ALLOC_HOOK_DECLARE'
> ../ace/Thread_Control.h:78: warning: transformation within macro
> 'ACE_ALLOC_HOOK_DECLARE'"
> 
> Thanks,
> Dimple
> 
> 
> 
> 
>>-----Original Message-----
>>From: aspectc-user-bounces at aspectc.org [mailto:aspectc-user-
>>bounces at aspectc.org] On Behalf Of Olaf Spinczyk
>>Sent: Wednesday, December 21, 2005 4:02 PM
>>To: aspectc-user at aspectc.org
>>Subject: [aspectc-user] Announcement of AspectC++ 1.0pre2
>>
>>Hi,
>>
>>the new AspectC++ release 1.0pre2 is now available from www.aspectc.org.
>>We uploaded binaries for Linux, Solaris, MacOS X and Win32 (all
>>statically linked). The sources and woven sources (for compilation
>>without ac++) are also available.
>>
>>The new version comes with the following new features:
>>
>>Version 1.0pre2 (2005-12-21)
>>
>>         * weaver improvements
>>           - friend declarations are also woven into structs
>>           - fixed handling of nested classes in template classes
>>           - support for introductions into aspects
>>           - generated constructors can now handle anonymous unions
>>           - array wrappers (needed by generated copy constructors)
>>             have been improved
>>           - implemented call advice for conversion functions
>>           - fixed call advice to functions that are declared as friend
>>           - fixed generated code for call advice for unary and binary
>>             operators if the call was located in a static member
>>             function
>>           - signatures of functions in namespace are now correct
>>           - fixed problem with access rights of wrapper code that is
>>             generated to implement call advice
>>           - support for the 'virtual' keyword in function signature
>>             match expressions
>>           - fixed several bugs related to call advice
>>           - fixed 1.0pre1 problem with execution advice for introduced
>>             functions
>>           - implemented several workarounds for VC++ parser problems
>>
>>         * parser
>>           - fixed numerous bugs (see bugzilla #269, #270, #272, ..)
>>
>>         * improved debugging support, error messages, warnings
>>           - #line directives for generated code fragments now point to
>>             the location in the generated files
>>           - the weaver now detects problematic code transformations
>>             in macro-generated code and prints a warning. Other
>>             transformations in the translation unit are not affected
>>             by this problem anymore
>>           - removed some useless warnings
>>
>>         * improved project repository
>>           - order advice is now listed in the repository
>>
>>         * performance and generated code size
>>           - header files with an include guard are not expanded anymore
>>             in STU mode if the guard macro is already defined. This
>>             reduces the size of the generated code enormously
>>           - improved performance and code size by grouping
>>             transformations
>>           - fixed the performance problem that drastically increased
>>             compilation time for SystemC application. The problem was an
>>             inefficient algorithm in the name lookup code if the system
>>             massively uses virtual inheritance.
>>           - simplified the scanner to improve the performance
>>
>>         * updated the quick reference sheet and the language reference
>>           - virtual function matching
>>           - intros into aspects
>>
>>         * added a number of the test programs for every fixed problem
>>           and new feature
>>
>>Besides lots of bug fixes, especially for call and construction advice,
>>this release improves the performance (> 30%). The severe performance
>>problem of the 1.0pre1 release with the SystemC header file is also
>>solved.
>>
>>Please continue to help us improve the ac++ implementation by entering
>>bug reports at http://www.aspectc.org/bugzilla or simply asking
>>questions on this mailing list.
>>
>>Have fun,
>>
>>Olaf Spinczyk




More information about the aspectc-user mailing list