Strictest Rules Possible Flags

I am using the GNU Mingw 5.3.0 g++.exe for my compiler. I am trying to make my c++ library as reliable as possible by trying to compile it with the most strictest command line flags possible. So, what would those command line flags?
Last edited on
Off the top of my head, -std=c++14 -Wall -Wextra -pedantic, but there may be others. But, the only way to true way to test portability is to actually compile your code with multiple compilers on multiple platforms.
Thank you so much, you are so incredibly helpful
-pedantic-errors instead of -pedantic.
You can see the list of supported compiler switches here:
https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
Hi,

Here are some that are still not enabled when using -std=c++14 -Wall -Wextra -pedantic-errors

http://www.cplusplus.com/forum/general/183731/#msg89920

But as jlb says, look at the whole list. My link might save a bit of time there.
Topic archived. No new replies allowed.