Skip to content

Commit

Permalink
Silence warning when building with clang on Windows, and an arm64ec c…
Browse files Browse the repository at this point in the history
…ompilation issue
  • Loading branch information
Anthony-Nicholls authored Oct 31, 2024
1 parent 60d5327 commit 123d322
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions containers/choc_Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -2442,6 +2442,12 @@ void ValueView::serialise (OutputStream& output) const
uint8_t* localCopy = nullptr;

#if _MSC_VER

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wlanguage-extension-token"
#endif

__try
{
localCopy = (uint8_t*) _alloca (dataSize);
Expand All @@ -2450,6 +2456,11 @@ void ValueView::serialise (OutputStream& output) const
{
throwError ("Stack overflow");
}

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#else
localCopy = (uint8_t*) alloca (dataSize);
#endif
Expand Down
2 changes: 1 addition & 1 deletion math/choc_MathHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#pragma intrinsic (_BitScanReverse64)
#endif

#ifdef _M_X64
#if defined (_M_X64) && ! defined (_M_ARM64EC)
#pragma intrinsic (_umul128)
#define CHOC_HAS_UMUL128 1
#endif
Expand Down

0 comments on commit 123d322

Please sign in to comment.