-
Notifications
You must be signed in to change notification settings - Fork 846
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
[Bug]: wc_static_assert used in header files breaks MSVC/VS2019 C++ compilation #8430
Comments
Hi @vaintroub , We have had issues with static_assert on MSVC/Visual Studio in the past, these issues were resolved in our most recent release 5.7.6. Please try upgrading and let me know if it helps. |
hi @kareem-wolfssl , sorry my mistake. We use the latest 5.7.6, and this error stems directly from it. I have corrected the version now Yes, about the issue - my humble opinion is that - maybe It is not tested well on your CI, since WolfSSL mostly uses pure C, including the example programs. Yes, the idea behind wc_assert is to catch errors during wolfssl compilation, not to cause errors for product that includes public headers. Just my interpretation, I could be wrong of course. Anyway, it causes errors in some environments, as I reported. |
@vaintroub , you can compile with Do you have a particular test clause in mind to detect and accommodate the toolchain version where the problem arise? By the way, I can't make sense of the
(https://learn.microsoft.com/en-us/cpp/build/reference/zc-static-assert?view=msvc-170) So the expected code here is C5254, and it is off by default. C2429 appears to be something completely different and unrelated (https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2429?view=msvc-170). Your comments regarding the complicated logic around |
I'm reporting what I have seen, and what other people have seen (MariaDB users see the problem, while we have not, by using a later version of the compiler). I see it with the latest VS2019, and do not see it with VS2022, as I already reported. |
@vaintroub try #8440 |
Contact Details
[email protected]
Version
5.7.6
Description
First reported in https://jira.mariadb.org/browse/MDEV-36054
Does not happen on MSVC included into VS2022
Reproduction steps
compile a C++ file that uses wolfssl 5.7.4, using MSVC included into Visual Studio 2019 without /std:c++17
Relevant log output
The text was updated successfully, but these errors were encountered: