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: [C++ Patch/RFC] Final part of c++/26099, __is_convertible_to


On 6/24/07, Richard Guenther <richard.guenther@gmail.com> wrote:
;)

I suppose you tried that - from a quick look that argument to
perform_implicit_conversion would need to be passed down to
a _lot_ of stuff.  I agree that a this global flag in diagnostics is
not the prettiest thing though.

I just looked into perform_implicit_conversion and it does not look that bad since you can use LOOKUP_NORMAL & ~LOOKUP_COMPLAIN for implicit_conversion and before calling convert_like, you can check if bad_p is true on the conversion and make sure convert_like_real's issue_conversion_warnings is false. And maybe a little more is needed in convert_like_real but it should not be that painful when I looked into the code.

What you did is something which I would considered to be a prototype
patch.  It is not like we don't control all of the C++ front-end.  Yes
the patch would become bigger but most of the infrastructure for not
warning/erroring out is already there.

I was not trying to be funny but I was trying to say you added a
feature to the generic code that is just ugly and makes the front-end
comunicating with a global variable which is just the wrong approach.

Also note I think it is wrong to put the variable in flags.h/toplev.h
anyways.  A more obvious place is to put it inside
diagnostic.c/diagnostic.h.

-- Pinski


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