[aspectc-user] Re: Aspect C++ and Symbian Error

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Fri Sep 9 10:00:04 CEST 2005


Hi again,

I haven't found an email with a solution :-(. However, I looked into an 
old version of this Symbian header file. There I found the typedef and 
an interesting comment by the Symbian developers..

/* There seems to be a lot of nonsense about _need_wchar_t etc., but for
  * STDLIB we have cut the Gordian knot and done the simple thing
  */

In my opinion, cutting the Gordian knot was not a good idea ;-) as in 
C++ normally wchar_t is a keyword.

BTW, g++ 3.3 also reports the typedef as an error:

limits.c:5: error: redeclaration of C++ built-in type `wchar_t'

As a workaround you can either modify this file (remove the typedef) or 
create a modified copy that is locate in a directory, which is searched 
first by ac++.

Maybe a macro would also help:

#define wchar_t symbian_wchar_t

(no guarantee)

Regarding ac++ we'll have to find out which compiler versions tolerate 
such a typedef and if we can integrate this behavior, e.g. in the 
g++-2.95 mode.

-Olaf


Olaf Spinczyk wrote:
> Hi,
> 
> the problem is that this peace of code is not standard compliant. 
> wchar_t is a keyword in C++. Therefore, this typedef is similar to 
> something like
> 
> typedef int long;
> 
> which also makes no sense.
> 
> I remember that we have already had this problem in the symbian header 
> files some time ago. I'll search my emails and post the solution as soon 
> as possible.
> 
> Could you meanwhile check if there is an #ifdef around this typedef? 
> Something like #ifdef __HAVE_BUILTIN_WCHAR_T.
> 
> Best regards,
> 
> Olaf
> 
> 
> Marti Bayo-alemany wrote:
>> Hi All,
>> You should have all the same problem with the stddef.h headers for 
>> MSVC6, MSVC7.
>>  
>> best wishes,
>> Marti
>>
>>     ----- Original Message -----
>>     *From:* Marti Bayo-alemany <mailto:malemany at nero.com>
>>     *To:* aspectc-user at aspectc.org <mailto:aspectc-user at aspectc.org>
>>     *Sent:* Thursday, September 08, 2005 7:12 PM
>>     *Subject:* Aspect C++ and Symbian Error
>>
>>     Hi all,
>>          I get the following error from ac++ when trying to compile 
>> with stddef
>>     C:/Symbian/7.0s/Series60_v20/Epoc32/include/libc/stddef.h:13: error:
>>     `signed' or `unsigned' invalid for given type            The 
>> offending line of code is ...
>>     typedef unsigned short int wchar_t;
>>          any idea how to work around that ?
>>          best wishes,
>>     Marti
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> aspectc-user mailing list
>> aspectc-user at aspectc.org
>> http://www.aspectc.org/mailman/listinfo/aspectc-user
> 
> _______________________________________________
> 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