Disable all gcc warnings

Phil Miller picture Phil Miller · Sep 21, 2009 · Viewed 137.3k times · Source

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?

Answer

Phil Miller picture Phil Miller · Sep 21, 2009

-w is the GCC-wide option to disable warning messages.