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]

Re: patch: kill N copies of fatal() in gen*.c


Jeffrey A Law wrote:
>   > It would be Really Nice if someone would fix it so libiberty could be
>   > used in the generator programs - they have their own copies of xmalloc
>   > et al, too.  I don't know enough about the build framework to do this.
> It's in the queue.  I approved a couple of what I thought were infrastructure
> patches that we needed first a few days ago.  Once those are in I'll review
> the patch which actually builds host & build copies of libiberty.

Glad to hear.

> If we are planning to link errors.o into the gen* programs and into
> stuff like cc1, when we ought to go ahead and use HOST_PREFIX.

Yeah.

The trouble with linking these into cc1, etc. is arranging for the
file and line info to be printed.  We probably need a callback
function.  It gets worse when you consider cpplib, which doesn't keep
the file+line info in global variables, so we need a way of passing an
opaque pointer to that callback function.  All this without mucking
with the API.  All doable - but I want to design it before I start
banging out code, and to do that I need to know what other people
(mainly the front end maintainers) need from a general error reporting
framework.

zw


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