This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: use the langhook to call the convert callback
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Rafael Espindola <rafael dot espindola at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 6 Mar 2006 23:21:02 +0000 (UTC)
- Subject: Re: use the langhook to call the convert callback
- References: <564d96fb0603061512r4e59ee28y1617484d9c3a2bb5@mail.gmail.com>
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)