-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Compiling with -Wshadow causes warnings/errors #318
Comments
The latest commit on the master branch should compile cleanly (library + all examples) on llvm/clang and gcc with -Wshadow. I've also added -Wshadow to the list of warnings that the development test suite uses. Let me know if this does not fix your issue. |
Unfortunately I still have compilation errors after pulling the latest version of master branch. |
Taking a look.. |
hrm.. the remaining cases are cases where a variable shadows a method. Clang and GCC 4.8+ do not emit a warning for this but it looks like GCC <=4.7 does. |
Actually I am using GCC 4.8.2 with -Wall, -Werror and -Wshadow. You can see the full command line in the file I previously referenced |
The changelog for GCC 4.8 claims that these cases should not trigger warnings, but I've confirmed that it isn't actually the case.I've pushed another update that also changes the cases where variables shadow functions. Can you confirm that this solves your warning issue? |
It works like a charm now, thank you! :) |
I am trying to use websocketpp in an application that is compiled with -Wshadow and -Werror. Compilation fails because -Wshadow triggers some warnings in websocketpp.
The text was updated successfully, but these errors were encountered: