cross-language-cpp / djinni-generator

Command-line tool that generates gluecode from a djinni-IDL file

Home Page:https://djinni.xlcpp.dev/djinni-generator/setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

32 bit flag to enum generation issue

martin00001313 opened this issue · comments

In case of defining flags which later are translated to 32 bit unsigned enum, for the 32th enum value issue is occurred as '1<<31' is considered signed i32 operation and is overflow.
Instead, by generating with unsigned postfix 'u', i.e. '1u<<31' will work fine.

Proposal, use '1u<<shift' instead of '1 << shift'. Both C++ and ObjC support it fine

Thank you for the report @martin00001313 !

Please feel free to add you as review to #143 , what will hopefully fix this isse

If you need a fix already today, you can use the Latest development build that was just generated