Disable all gcc warnings
162,469
-w
is the GCC-wide option to disable warning messages.
Related videos on Youtube

Author by
Phil Miller
Contact me for help speeding up your technical computing applications, software development process training and guidance, and other sophisticated development needs. LinkedIn or email on that profile preferred.
Updated on September 21, 2020Comments
-
Phil Miller over 2 years
I'm working on a project that will read compiler error messages of a particular variety and do useful things with them. The sample codebase I'm testing this on (a random open-source application), and hence rebuilding frequently, contains a few bits that generate warnings, which are of no interest to me.
How do I disable all warnings from GCC, so I can just see error messages if there are any?
-
Mitch Wheat over 13 yearsBut please note; you would be better refactoring your code to eliminate the warnings rather than turning them off!
-
Phil Miller over 13 years@Mitch: I believe I've clarified the question to make it clear that I'm neither responsible for nor interested in these warning messages. They really don't matter for these purposes.
-