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: use the langhook to call the convert callback


On Mon, 6 Mar 2006, Rafael Espindola wrote:

> The attached patch creates a single convert function that simply calls
> langhooks.types.convert. The front end callbacks are renamed to have a
> lang prefix (c_convert, cxx_convert .)...

Much as I'd be glad to see the removal of this last instance of a special 
function name front ends must provide, I'm not convinced that we need such 
a langhook at all.  In general convert calls outside front ends should not 
involve language-specific conversion semantics; they should call another 
function such as fold_convert instead.  If we continued moving from 
convert to fold_convert, we might be able to rename the functions without 
adding a langhook.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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