[aspectc-user] AC meets Symbian

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Mon Jul 5 09:15:47 CEST 2004


Hi Thiago and Bil,

Thiago A. CorrĂȘa wrote:
> Hi,
> 
>    ac++ has some serious problems
> figuring out overloads. I'm not sure
> if this one is the same bug that I
> reported ( see bugtrack ), but it sure
> looks like it.
> 
> 
>>Hi Olaf (et. al.),
>>
>>After some discussion with others
> 
> here on 
> 
>>the various things we talked about,
> 
> it was
> 
>>concluded that my proper course was
> 
> to pursue
> 
>>using AC first, and then look at the
> 
> possibility
> 
>>of implementing all the GUI stuff
> 
> which I was talking
> 
>>about.
>>
>>Seems fair.
>>
>>So I ran through the demos on the
> 
> distribution. They
> 
>>all work as advertised.
>>
>>Cool.
>>
>>So I tried doing something very
> 
> simple with the
> 
>>Symbian code.
>>
>>Not cool.
>>
>>AC++ complains about some of the
> 
> header files. I've
> 
>>looked through them and don't see
> 
> anything unusual.
> 
>>But this is C++, so anything is
> 
> possible.
> 
>>Here's a typical error msg:
>>
>>
>>C:\..\elloWorld>c:\ac\ac++ -e cpp -p
> 
> src -d out -v1   -DNDEBUG -D_UNICODE 
> 
>>-D__SYMBIAN32__ -D__GCC32__
> 
> -D__EPOC32__ -D__MARM__
> -D__AVKON_ELAF__ -D__MARM_ARM4__ 
> 
>>-D__DLL__  
>>-I
> 
> "c:\Symbian\6.1\Series60\EPOC32\INCLUDE"  
> 
>>-I
> 
> "c:\SYMBIAN\EMCCSOFT\HELLOWORLD\INC"   
> 
>>-I
> 
> "c:\SYMBIAN\EMCCSOFT\HELLOWORLD\SRC\" 
> 
>>-I
> 
> "c:\SYMBIAN\EMCCSOFT\HELLOWORLD\GROUP" 
> 
>>..s32strm.inl(296): error: call to
> 
> function `ExternalizeL (const TSize
> &,RWriteStream &)' is ambiguous
> 
>>..s32strm.inl(134): candidates are
> 
> `void ExternalizeL(const TRect
> &,RWriteStream &)'
> 
>>..s32strm.inl(133):               
> 
> `void ExternalizeL(TSize,RWriteStream &)'
> 
>>
>>I played around, changing the
> 
> various flags with no
> 
>>particular result. The flags and
> 
> includes come from
> 
>>the command line given to GCC (which
> 
> works).
> 
>>The actual code is not unusual
> 
> (s32std.h) and seems correct:
> 
>>  
> 
> ===========================================
> 
>>...
>>
>>class TRect
>>	{
>>public:
>>	enum TUninitialized { EUninitialized };
>>	TRect(TUninitialized) {}
>>...
>>
>>class TSize;
>>
>>  
> 
> ===========================================
> 
>>
>>and (s32strm.inl):
>>
>>
>>  
> 
> ===========================================
> 
>>...
>>IMPORT_C void ExternalizeL(TSize
> 
> aSize,RWriteStream& aStream);
> 
>>IMPORT_C void ExternalizeL(const
> 
> TRect& aRect,RWriteStream& aStream);
> 
>>...
>>inline RWriteStream&
> 
> operator<<(RWriteStream& aStream,const
> TSize& aSize)
> 
>>	{ExternalizeL(aSize,aStream);return
> 
> aStream;}
> 
>>...
>>
>>  
> 
> ===========================================
> 
>>
>>
>>
>>
>>So...
>>
>>I'm lost. I'm 86.7% certain that the
> 
> compilers used by symbian (GCC,
> 
>>VC, BCC) are the same as used
> 
> normally. Thus it would appear that they
> 
>>will parse a .h file that AC++
> 
> won't. But that's a guess. I really don't
> 
>>know enough to confirm it.
>>
>>Is there anything you can suggest?
>>
>>-Bil

we tried to parse a Symbian OS example application a few weeks ago and 
it worked. Probably the reason is that not so many functions were 
actually *called* by this simple "hello world"-like program.

Obviously, there is a problem in the overload resolution. This is shown 
by Thiago's bug 175 and the Bil's Symbian problem. We'll fix this as 
soon as possible, but we need your help. I was not able to reproduce 
Bil's problem from the example code (ac++ terminated with error message, 
but g++ did so as well, because TSize is only declared and not defined).

To be able to fix such problems quickly we need minimal example code, 
i.e. it should not depend on any header files and it should not contain 
any code, which is not related to the problem. I did this for bug 175:

class C2 {};

class C3 {
   C3(C2 c) {}
};

void contains( const C3&) {}
void contains( C2 ) {}

int main () {
   C2 c2;
   contains(c2);
}

=>

t19.c:12: error: call to function `contains (C2)' is ambiguous
t19.c:8: candidates are `void contains(C2)'
t19.c:7:                `void contains(const C3 &)'

Bil, we'll now look into Thiago's bug 175 first. You could either wait 
until this is fixed and hope that the Symbian problem also disappears or 
  actively help us. We need some (minimal) example code (from you) which 
we can use to reproduce the problem. Then we'll be able to come up with 
a quick bugfix.

Yours,

Olaf



More information about the aspectc-user mailing list