FW: [aspectc-user] Visual Studio and ac++ ?

Matthias Urban matthias.urban at pure-systems.com
Wed Mar 19 12:17:08 CET 2008


Hi,

thanks a lot for your bug report.

> 1) ac++ don't seem to support that kind of include preprocessor
> command containing windows style backslash path separators :
>
> #include <in\here.h>
>     
> But maybe it is rather due to Visual Studio supporting an out of
> C++ specification feature ?

That it is. But at least in the --vc mode, this path syntax has to be 
supported too. I've added a corresponding bug in the AspectC++ Bugzilla.

> 2) I got stuck on a strange class declaration :
>
> Here is a simplified extract of what is causing this trouble :
>
> --------------------------
>     template <bool _SECURE_VALIDATION>
>     class _Iterator : public _Const_iterator<_SECURE_VALIDATION>
>     {
>         friend _Iterator<false>;
>         friend _Iterator<true>;
>     };
> ----------------------------
>
> ac++ don't like the first friend declaration.
>        
> Note that, as I don't know what can cause this trouble, maybe I
> simplified too much this extract. 

Here the problem is that you are not allowed to define a class type 
friend without specifying keyword "class", i.e. the friends should look 
like this:

friend class _Iterator<false>;
friend class _Iterator<true>;

That's again a nasty and completely mindless VC++ extension.

> 3) The following extract of file crtwrn.h is not parsable for
> ac++ because of the second backslash :
>
> ------------------------------------
> #define _CRTWRN_MESSAGE__NO_ITERATOR_DEBUGGING Iterator debugging not \
>         supported in retail builds.\n  \
>         Setting _HAS_ITERA##TOR_DEBUGGING=0   
> ------------------------------------

I can not reproduce it. Maybe we fixed it in the meanwhile, accidentally.

> 4) The "using namespace" formulation doesn't seem to be
> supported by ac++, at least for the following example:
>
> -------------
> #include <aFile.h>    // namespaces are declared within aFile.h
> using namespace namespaceOne;
>
> class A : public B
> {
>     // namespaceTwo is defined within namespaceOne
>     namespaceTwo::aType myVariable;
> }
> -------------
>
> An error is reported on "myVariable" declaration.

That's a surprising bug because such constructs should be quite often. 
I've added a new bug report for this.

> Hope it will help.

Yes, it really helped a lot. Thanks again.

Best regards,
Matthias



More information about the aspectc-user mailing list