Re: SWIG: GCC compile errors with unsigned char when using the compactdefaultargs or kwargs feature

Terry Barnaby <[email protected]>
Newsgroups gmane.comp.programming.swig
Message-ID <[email protected]>
On 13/06/2020 09:29, Alberto Luaces wrote:
> On Fri, Jun 12, 2020, at 09:07, Terry Barnaby wrote:
>> bds_wrap.cpp:2947:40: error: expected primary-expression before ‘unsigned’
>>    2947 |   unsigned char arg1 = (unsigned char) unsigned char() ;
> To me, it looks like a C++ issue.  If you typedef T to a single word, you can get this running.
>
>
> _______________________________________________
> Swig-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/swig-user
Well I would not have thought that this was legitimate 'C' syntax ?

unsigned char arg1 = (unsigned char)char();

This would be valid 'C'/'C++', although questionable as to what it would 
do. It seems to me that SWIG is getting this wrong when the type is 
"unsigned char/short/int" etc.

Terry



_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.