Thread overview
[Issue 23184] importC: array length macro doesn't compile
[Issue 23184] importC: array division with sizeof is problematic
Jun 13, 2022
ryuukk_
Jun 14, 2022
ryuukk_
Jun 14, 2022
ryuukk_
Jul 07, 2022
Walter Bright
June 13, 2022
https://issues.dlang.org/show_bug.cgi?id=23184

ryuukk_ <ryuukk.dev@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC

--
June 14, 2022
https://issues.dlang.org/show_bug.cgi?id=23184

ryuukk_ <ryuukk.dev@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|importC: array division     |importC: array length macro
                   |with sizeof is problematic  |doesn't compile

--
June 14, 2022
https://issues.dlang.org/show_bug.cgi?id=23184

--- Comment #1 from ryuukk_ <ryuukk.dev@gmail.com> ---
This line too is problematic:

int len = (int)( (sizeof(nk_utfmask)/sizeof(0[nk_utfmask])) /
((size_t)(!(sizeof(nk_utfmask) % sizeof(0[nk_utfmask])))) );

--
July 07, 2022
https://issues.dlang.org/show_bug.cgi?id=23184

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|---                         |WORKSFORME

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
This works when I try it (though size_t was undefined). In general, please provide complete code snippets, rather than incomplete fragments where guessing at what is missing is necessary.

I don't know what error you're seeing. But if things don't work for you with the latest compiler, please reopen and supply the error message you see.

--