This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]