This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question about new warning system
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: <dj at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 10 Jun 2005 15:41:39 +0200
- Subject: Question about new warning system
Hello DJ,
I'm updating a piece of code of the C++ frontend which involves a warning,
so I was planning on adding the correct warning option to it. The original
code is the following:
if (warn_missing_braces)
warning (0, "missing braces around initializer");
So, what is the correct way of fixing this:
[1]
if (warn_missing_braces)
warning (OPT_Wmissing_braces, "missing braces around
initializer");
[2]
if (OPT_Wmissing_braces)
warning (OPT_Wmissing_braces, "missing braces around
initializer");
[3]
warning (OPT_Wmissing_braces, "missing braces around initializer");
What is the difference between [1], [2], [3]?
Thanks,
--
Giovanni Bajo