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

fix gcc13 #483

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion common/iovector.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ limitations under the License.
#include <photon/common/io-alloc.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#if __GNUC__ >= 13
// #pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Wzero-length-bounds"
#endif

inline bool operator == (const iovec& a, const iovec& b)
{
Expand Down
5 changes: 5 additions & 0 deletions common/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ TEST(Callback, virtual_function)
Callback<int> dd(lambda);
// Callback<int> ee([&](int x){ return RET + x/2; });

#pragma GCC diagnostic push
#if __GNUC__ >= 13
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
THIS = (BB*)&c;
#pragma GCC diagnostic pop
LOG_DEBUG(VALUE(THIS), VALUE(&c));

for (int i=0; i<100; ++i)
Expand Down
4 changes: 3 additions & 1 deletion rpc/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ namespace rpc {
return -1;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#if __GNUC__ >= 13
// #pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
ThreadLink node;
m_list.push_back(&node);
#pragma GCC diagnostic pop
Expand Down
2 changes: 1 addition & 1 deletion thread/thread11.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ namespace photon {

void asdf()
{
int a; char b;
int a = 0; char b = 0;
auto func = &__Example_of_Thread11__::member_function;
auto cfunc = &__Example_of_Thread11__::const_member_function;

Expand Down
Loading