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

gcc 10.1 warning #2673

Closed
vondele opened this issue May 12, 2020 · 1 comment
Closed

gcc 10.1 warning #2673

vondele opened this issue May 12, 2020 · 1 comment

Comments

@vondele
Copy link
Member

vondele commented May 12, 2020

reported https://groups.google.com/d/msg/fishcooking/3i7MgBgsFJM/VMreTlH8AAAJ

need to fix (patches welcome):

syzygy/tbprobe.cpp:451:47: warning: 'void* memset(void*, int, size_t)' clearing an object of type '{anonymous}::TBTables::Entry' {aka 'class std::tuple<long long unsigned int, {anonymous}::TBTable<<unnamed>::WDL>*, {anonymous}::TBTable<<unnamed>::DTZ>*>'} with no trivial copy-assignment; use assignment instead [-Wclass-memaccess]
  451 |         memset(hashTable, 0, sizeof(hashTable));
      |                                               ^
In file included from C:/msys64/mingw64/include/c++/10.1.0/mutex:38,
                 from syzygy/tbprobe.cpp:30:
C:/msys64/mingw64/include/c++/10.1.0/tuple:516:11: note: '{anonymous}::TBTables::Entry' {aka 'class std::tuple<long long unsigned int, {anonymous}::TBTable<<unnamed>::WDL>*, {anonymous}::TBTable<<unnamed>::DTZ>*>'} declared here
  516 |     class tuple : public _Tuple_impl<0, _Elements...>
      |           ^~~~~
@d3vv
Copy link

d3vv commented May 12, 2020

Hmm.. But what about to use "={0}" against memset? ;-)

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 a pull request may close this issue.

2 participants