Skip to content

fix: fix compile error for gcc11.2#11

Open
zimo-mo wants to merge 2 commits into
mindspore-ai:masterfrom
zimo-mo:fix4gcc11
Open

fix: fix compile error for gcc11.2#11
zimo-mo wants to merge 2 commits into
mindspore-ai:masterfrom
zimo-mo:fix4gcc11

Conversation

@zimo-mo

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

Copy link
Copy Markdown

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