Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added preprocessor checks for Clang on Windows #733

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

Razakhel
Copy link
Contributor

MSVC-specific code is used in some places (__try, __except and __forceinline) and compiled only if _MSC_VER is set; however, Clang under Windows also defines this, which reports errors on this non-standard code if the -pedantic-errors compiler flag is set:

In file included from tracy/public/TracyClient.cpp:14:
tracy/public/common/TracySystem.cpp:126:5: error: extension used [-Werror,-Wlanguage-extension-token]
    __try
    ^
In file included from tracy/public/TracyClient.cpp:22:
tracy/public/common/tracy_lz4.cpp:445:1: error: extension used [-Werror,-Wlanguage-extension-token]
LZ4_FORCE_INLINE
^
tracy/public/common/tracy_lz4.cpp:132:37: note: expanded from macro 'LZ4_FORCE_INLINE'
#    define LZ4_FORCE_INLINE static __forceinline
                                    ^

- MSVC-specific code is used in some places and compiled only if _MSC_VER is set; however, Clang under Windows also defines this, which reports errors on this non-standard code if the -pedantic-errors compiler flag is set
@wolfpld
Copy link
Owner

wolfpld commented Feb 21, 2024

Please submit your changes to https://github.com/lz4/lz4/

@Razakhel
Copy link
Contributor Author

Razakhel commented Mar 5, 2024

Sorry for not getting back to you earlier! The related PR on lz4 has been merged, so this one should be good.

@wolfpld wolfpld merged commit 7d813ec into wolfpld:master Mar 5, 2024
5 checks passed
@Razakhel Razakhel deleted the fix-clang-pedantic-windows branch March 5, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants