-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GCC9 break: trying to memcpy C++ objects #1700
Comments
This is a warning. I suggest adding pragma to ignore this. |
I suggest that you fix the broken code by merging #1698. |
It is perilous to ignore or suppress warnings about undefined behavior. Exercising UB is a primary source of misbehavior, and especially for optimization-associated behavior variation. And it is especially an issue for a header-only library such as this one, because it is impossible for the library distribution to provide suitable tests for the observable behavior, as it may vary from use to use. This issue (which also affects GCC 8) ought to be fixed, not papered over. |
@jcbollinger indeed, see #1698. |
the patch intended to fix compilation broke rapidjson as documented in #25912 I verified this by compiling and running the test suite with and without the patch applied. There is a proposed fix in Tencent/rapidjson#1698 which seemingly was rejected by the upstream developers, the issue is documented at Tencent/rapidjson#1700. Since upstream insists that what they are doing is correct, make the compiler ignore the errors for now. Alternatively, we could still apply the proposed patch to our package.
the patch intended to fix compilation broke rapidjson as documented in void-linux#25912 I verified this by compiling and running the test suite with and without the patch applied. There is a proposed fix in Tencent/rapidjson#1698 which seemingly was rejected by the upstream developers, the issue is documented at Tencent/rapidjson#1700. Since upstream insists that what they are doing is correct, make the compiler ignore the errors for now. Alternatively, we could still apply the proposed patch to our package.
git clone the latest, inteading of downloading in the release url. |
GCC9 identifies a case of undefined behavior where the code attempts to copy C++ objects with
std::memcpy
.The text was updated successfully, but these errors were encountered: