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

reevaluate disablement of strict aliasing warning in chain_plugin #229

Closed
spoonincode opened this issue Sep 26, 2022 · 2 comments · Fixed by #248
Closed

reevaluate disablement of strict aliasing warning in chain_plugin #229

spoonincode opened this issue Sep 26, 2022 · 2 comments · Fixed by #248
Labels
OCI Work exclusive to OCI team

Comments

@spoonincode
Copy link
Member

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"

A warning about strict aliasing is probably something that should be tended to, not silenced away.

@larryk85
Copy link
Contributor

This does have the potential of being very bad, so I would say this is one the higher priority tasks and we might want to port any changes needed for this fix to 3.1.x.

In addition to the one place that was found, we should search for more such places in the code that is ignoring warnings. Compiler warnings are usually there for a reason and ignoring them is almost never the valid answer to the problem.

@ericpassmore
Copy link
Contributor

ericpassmore commented Sep 27, 2022

find . -type f ! -name 'test' | xargs egrep "#pragma.*ignored"
./plugins/chain_plugin/chain_plugin.cpp:#pragma GCC diagnostic ignored "-Wstrict-aliasing"
./libraries/chain/include/eosio/chain/config.hpp:#pragma GCC diagnostic ignored "-Wunused-variable"
./libraries/wasm-jit/Source/WAST/ParseNumbers.cpp: #pragma GCC diagnostic ignored "-Wsign-compare"
./libraries/wasm-jit/Source/WAST/ParseNumbers.cpp: #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
./libraries/wasm-jit/Source/WAST/ParseNumbers.cpp: #pragma GCC diagnostic ignored "-Wsign-compare"
./programs/eosio-launcher/main.cpp:#pragma GCC diagnostic ignored "-Wunused-result"
./programs/cleos/CLI11.hpp:#pragma GCC diagnostic ignored "-Wnarrowing"

@stephenpdeos stephenpdeos added OCI Work exclusive to OCI team and removed triage labels Sep 27, 2022
heifner added a commit that referenced this issue Sep 27, 2022
…ugin. Also removed pragma to ignore unused-variable from config.hpp. All other changes were to address the removal the ignore unused-variable.
heifner added a commit that referenced this issue Sep 27, 2022
heifner added a commit that referenced this issue Sep 27, 2022
heifner added a commit that referenced this issue Sep 28, 2022
[3.1] Remove #pragma(s) to ignore warnings
heifner added a commit that referenced this issue Sep 28, 2022
[3.1 -> main] Remove #pragma(s) to ignore warnings
Repository owner moved this from Todo to Done in Team Backlog Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants