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: fix compile error for gcc11.2 #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zimo-mo
Copy link

@zimo-mo zimo-mo commented Dec 30, 2021

fix: fix compile error for gcc11.2
Linux debian 5.15.0-2
gcc-11.2
cmake-3.22.1
python3.9
mindspore commit: f9270b8e095df15aa26574a758498316dd307f2f

error eg:
mindspore/akg/third_party/incubator-tvm/3rdparty/picojson/picojson.h:389:122: error: suggest parentheses around assignment used as truth v
alue [-Werror=parentheses]
389 | GET(double, (type_ == int64_type && (const_cast<value*>(this)->type_ = number_type, const_cast<value*>(this)->u_.number_ = u_.int64_),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/hyolin/project/mindspore/akg/third_party/incubator-tvm/3rdparty/picojson/picojson.h:377:12: note: in definition of macro ‘GET’
377 | return var;
| ^~~

Linux debian 5.15.0-2
gcc-11.2
cmake-3.22.1
mindspore commit: f9270b8e095df15aa26574a758498316dd307f2f

error eg:
mindspore/akg/third_party/incubator-tvm/3rdparty/picojson/picojson.h:389:122: error: suggest parentheses around assignment used as truth v
alue [-Werror=parentheses]
389 | GET(double, (type_ == int64_type && (const_cast<value*>(this)->type_ = number_type, const_cast<value*>(this)->u_.number_ = u_.int64_),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/hyolin/project/mindspore/akg/third_party/incubator-tvm/3rdparty/picojson/picojson.h:377:12: note: in definition of macro ‘GET’
377 | return var;
| ^~~
@zimo-mo zimo-mo changed the title env: fix: fix compile error for gcc11.2 Dec 30, 2021
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.

1 participant