This is the mail archive of the gcc-patches@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]

Re: PATCH to C front-end: PR 21759


"Joseph S. Myers" <joseph@codesourcery.com> writes:

| On Thu, 9 Jun 2005, Gabriel Dos Reis wrote:
| 
| > +       if (warn_cxx_compat && VOID_TYPE_P (ttr) && rhs != null_pointer_node
| > +           && !VOID_TYPE_P (ttl))
| > +         warning (OPT_Wc___compat, "request for implicit conversion from "
| > +                  "%qT to %qT not permitted in C++", rhstype, type);
| 
| It's not clear this is a case which needs the "if (warn_...) rather than 
| just controlling the warning through the first argument to warning.

After reading a recent explanation from DJ, I think controlling the
warning with warn_xxx is needed.  As per DJ, the first argument is
always a non-zero enumeration constant.

-- Gaby


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