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: [PING^3] Wconversion: fixes for C++ front-end


On Tue, 6 Feb 2007, Manuel López-Ibáñez wrote:

| On 06/02/07, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
| > On Tue, 6 Feb 2007, Manuel López-Ibáñez wrote:
| >
| > | I am waiting for patches to get reviewed. I hope that at least this is
| > | not my fault. If I can do something to get the patches reviewed
| > | faster, please, let me know.
| >
| >
| > The bits:
| >
| >        if (TREE_TYPE (op0) != result_type)
| > -      op0 = cp_convert (result_type, op0);
| > -      if (TREE_TYPE (op1) != result_type)
| > -      op1 = cp_convert (result_type, op1);
| > +      {
| > +        convert_and_check (result_type, op0);
| > +          op0 = cp_convert (result_type, op0);
| > +          }
| > +      if (TREE_TYPE (op1) != result_type)
| > +      {
| > +        convert_and_check (result_type, op1);
| > +          op1 = cp_convert (result_type, op1);
| > +      }
| >
| >
| > convert op0, but throw the result away, then call cp_convert
| > to convert again.  That looks curious to me.  Why would we want to do
| > that?
|
| Well, I would love to just use convert_and_check. But it didn't seem
| to me that cp_convert was the same as the convert function invoked
| from convert_and_check.

No, there aren't; but they seem to overlap.

What is needed is to understand why you can or cannot give the result
of convert_and_check to cp_convert.  Just computing one and throwing
the result does not look right to me.

-- Gaby


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