This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [warning control] New #pragma GCC diagnostic
DJ Delorie wrote:
> Does -w inhibit warnings before they're turned into errors? Before
> the pragmas can turn individual warnings into errors? Can the pragmas
> enable warnings which -w would have otherwise inhibited?
I think -w means no warnings come out of the compiler, period. The user
will never see a diagnostic that starts with "warning:". In other
words, conceptually, apply the -w filter late -- right when you're about
to say "warning:". A #pragma that enables a warning still enables it,
but then it's not emitted. If we had a #pragma for turning an error
into a warning, then that would still happen -- but you'd get no output
from the warning.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713