This is the mail archive of the gcc@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: [RFC] removal of the convert callback


On Mon, 27 Mar 2006, [UTF-8] Rafael EspĂ­ndola wrote:

> I have put toghether a hack to remove the convert callback. It consists in
> 1) adding a lang prefix to the implementations of convert (cxx_, c_,
>    gfc_, etc)
> 2) defining a convert2 function that is basically a copy of c_convert
> 3) converting the calls to convert to calls to the lang specif
>    implementations or convert2

I've a number of patches to clean-up the use of "convert" in GCC
myself.  If you'll give me a week or so to submit/commit them to
the tree, it'll make your life much easier.  My patches aim to
remove all uses of "convert" from libbackend.a (simplifying the
interface between the front-end and the middle-end).  Once this
is done, your task of renaming the functions gets much simpler.

The trick is that not all of the "convert" functions behave
identically, which is why basing convert2 on c_convert fails
for g++, which really needs cp_convert.  Instead of a new
convert2, the middle-end should be using the existing fold_convert
which performs the common language-independent conversions.

Finally, I suspect that some front-ends, probably java, fortran
and treelang, only define "convert" for use by the middle-end,
which means once the middle-end is cleaned up these functions
can be removed from their respective front-ends entirely.

I hope this makes sense.  Sorry for not noticing your post
earlier.  I tend to read the gcc list less frequently than
gcc-patches.

Roger
--


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