Manuel López-Ibáñez - Re: [PING^3] Wconversion: fixes for C++ front-end (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.

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)

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. (Both are defined in cp/cvt.c). So I preferred to be on the safe side rather than experiment with my ignorance.

If you think that it is safe to replace cp_convert with convert, then it is safe to use the return value of convert_and_check.