[PATCH] Add warning about false being implicitly converted to NULL in parameter passing

Manuel López-Ibáñez lopezibanez@gmail.com
Mon Mar 12 15:58:00 GMT 2007


On 12/03/07, Dirk Mueller <dmueller@suse.de> wrote:
> On Monday, 12. March 2007, Manuel López-Ibáñez wrote:
>
> > Your patch breaks mine:
> > [PING^5] Wconversion: fixes for C++ front-end
> > http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00048.html
> >
> > Since yours is approved and mine hasn't been reviewed yet. Would you
> > mind posting the final patch once you commit it?
>
> I've checked your patch, it touches a related area but should be orthogonal.
> At least it seems to work in my work checkout and my clean checkout.
>
> I'll see if I can do the requested refactoring in a way your patch intended it
> to do.
>

My patch removes the following:

   /* Warn about assigning a floating-point type to an integer type.  */
     if (TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE
         && TREE_CODE (t) == INTEGER_TYPE)
       {
         if (fn)
           warning (OPT_Wconversion, "passing %qT for argument %P to %qD",
                    TREE_TYPE (expr), argnum, fn);
         else
           warning (OPT_Wconversion, "converting to %qT from %qT", t, TREE_TYP\
E (expr));
       }

That is where the conflict is going to appear but don't worry too much
about it, the update to my patch is simple. Just let me know when your
patch is in, so I can update and re-test mine.

Cheers,

Manuel.



More information about the Gcc-patches mailing list