This repository has been archived by the owner on Jul 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 204
Annoying warning when using c++11/14 support #201
Comments
Are you sure? GCC's
Don't use |
Hello,
First of all thank you for finding some time to look into this issue. Yes, you’re correct: we enabled explicitly -wsuggest-override as part of our plan to have our whole code base completely migrated to c++11/14 (and also warning free).
Honestly I was hoping more in an answer like “we will consider this as a future enchantment to the gmock framework” and not like “don’t use it”.
Anyway, feel free to close this issue.
Best regards,
Luca Stoppa
… Il giorno 27 set 2017, alle ore 14:01, Jonathan Wakely ***@***.***> ha scritto:
when using gmock with -Wall -Extra enabled we get a huge number of annoying warnings.
Are you sure?
GCC's -Wsuggest-override warning is not enabled by -Wall -Wextra so you must be using that option explicitly.
Is there any way to avoid this?
Don't use -Wsuggest-override if you don't want those warnings.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm not a googletest dev, I'm a GCC dev pointing out that you don't get that warning unless you request it. I suggested a workaround to the warning at google/googletest#1063 (comment) |
Oh I see. I thought somehow you were maintaining the gmock library as well (I know you surname very well from the god mail list). Anyway, thanks! The workaround you suggested should work well.
Luca Stoppa
… Il giorno 27 set 2017, alle ore 17:32, Jonathan Wakely ***@***.***> ha scritto:
I'm not a googletest dev, I'm a GCC dev pointing out that you don't get that warning unless you request it.
I suggested a workaround to the warning at google/googletest#1063 (comment)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
when using gmock with -Wall -Extra enabled we get a huge number of annoying warnings.
For example
warning: 'virtual testing::internal::Function<bool()>::Result tse::Test(testing::internal::Function<bool(tse::MyTest*)>::Argument1) const' can be marked override [-Wsuggest-override]
I believe the problem is related to how those MOCK_CONST_METHOD_T work, in particular
for c++11 they still generate a method:
virtual ReturnType name(Args)
instead of
ReturnType name(Args) override
Is there any way to avoid this?
Thanks,
Luca
The text was updated successfully, but these errors were encountered: