gcc flags for specific msvc compiler warnings

I'm looking for the gcc equivalent to 4 different compiler warnings that i am experiencing when using msvc. I do not wish to suppress them as they should be resolved because those only using linux don't see them and keep committing changes that introduce these warnings.

https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4626?view=vs-2019
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4627?view=vs-2019

The next two are found at https://docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default?view=vs-2019

C5026 (level 1 and level 4) 'type': move constructor was implicitly defined as deleted
C5027 (level 1 and level 4) 'type': move assignment operator was implicitly defined as deleted

Does any one know if these warnings can be turned on using gcc?

Thank you,

Tom



Last edited on
Are you saying that -Wall -Wextra -pedantic does not turn on these warnings?
AFAIK, there is no way to turn on these warnings with g++.
is it just telling you that it optimized away unused automatically created items?
No. It is telling us that it conformed to the standard; and as per the standard, the class is not copyable / moveable.

Quite understandably, g++ does not generate a warning for this; it would generate an error if we try to use the implicitly deleted function, and also give us the reason for it to be implicitly deleted.
Snippet: http://coliru.stacked-crooked.com/a/c4b19446d7017c3f
Last edited on
Thank you everyone for the replies.
Topic archived. No new replies allowed.