On Thu, 24 May 2018, Liu Hao wrote:

在 2018/5/24 14:59, Martin Storsjö 写道:
That seems like a very new addition, too new to rely on. Notice how it is present in the 7.1.0 docs [1] but missing in the 6.1.0 docs [2].

Additionally, clang does seem to define this kind of macros, but not all of them (it defines e.g. __SIZE_WIDTH__ but not __LONG_WIDTH__).


Got it. `sizeof(long) * __CHAR_BIT__` should suffice.

No, not sizeof(long). It would be sizeof(__LONG32), or sizeof(Mask).

But I checked with MSYS2 for x64, and even if sizeof(long) == 8, it still has got sizeof(__LONG32) == 4, just as it should.

So with that, I think the extra rewrite is a little pointless since it's a datatype that has the exact size written in the type name itself. Buf if you insist, I could make it sizeof(__LONG32).

// Martin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to