Tracktion / choc

A collection of header only classes, permissively licensed, to provide basic useful tasks with the bare-minimum of dependencies.
Other
540 stars 49 forks source link

More JUCE suggestions #61

Closed Anthony-Nicholls closed 3 weeks ago

Anthony-Nicholls commented 3 weeks ago

Well just as I got those other fixes through, more builds were added to our CI 😆

For the pragma ignore, I'm struggling to see how to avoid an ignore of some description. The ignore in this PR is required because of the use of __try when building with clang on windows (I think with pedantic warnings enabled, I would need to check exactly what triggered it). If we don't use __try then MSVC will complain, suggesting to use _malloca instead, but that will allocate on the heap for anything over 1024 bytes by default. We could instead ignore the MSVC warning and drop the try/except?

The other issue is fairly simple _M_X64 is defined for arm64ec builds (but not arm64). In theory using _umul128 should work but because there is no equivalent intrinsic for arm64 a warning is triggered C4163: 'UnsignedMultiply128': not available as an intrinsic function. _M_ARM64EC is only defined for am64ec builds so we can easily detect the edge case.

julianstorer commented 3 weeks ago

Cheers, this looks sensible to me, will merge it..