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]

Re: egcs-1998-06-12: bootstrap failure


[Back to discussing this on the list.  "This" being the strange
series of diagnostics Toon Moene encountered building c-lex.c,
quoted first.]

>>../../egcs/gcc/c-lex.c:1445: warning: variable `conversion_errno'  
>>might be clobbered by `longjmp' or `vfork'
>>../../egcs/gcc/global.c:401: Internal compiler error in function  
>>global_alloc
>>make[2]: *** [c-lex.o] Error 1
>>
>>Note that the error message reports the source file as  
>>`../../egcs/gcc/global.c', which is completely bogus, as the compile  
>>line above clearly shows that the file being compiled is c-lex.c.
>>
>>Something very fishy is going on here.

>No, it's not compiling global.c; it's an error message from "cc1"
>while compiling c-lex.c. The function "global_alloc.c" from global.c
>at line 401 called "abort ()" which has been redefined to print out
>this message and then really abort. I agree, this layout is at least
>misleading and should be fixed.

Oh, wow, you're right, that *should* be fixed; the current
message is highly misleading!  You seem to be the only person
who understood this (that I know of anyway)!

Is anyone willing to tackle this?  At least, the diagnostic should
be changed, IMO, to either print the proper source filename being
processed (that is, the input_filename variable or whatever it's
called) or to print __FILE__ in a way that is visibly distinct
from the way the source file is printed.

That is, either `abort' should be defined to print the usual
source/line info that a call to fatal() might print, or shouldn't
print anything at all using the `%s:%d: blah blah blah' syntax.
Either way it probably should still print, on the line after
the `blah blah blah', a line indented by some spaces that says
something like:

  (This error is internal to the compiler, and can be tracked down
  starting on line %d of source file %s.)

(The abort macro is defined in system.h.  I'd be willing to submit
a patch if the "owners" of the relevant stuff don't step forward.
If system.h is used more widely than just in the gcc part of egcs,
especially if it's used in a non-compiler, then maybe replace
"compiler" above with "program", though that gets a bit vague.)

        tq vm, (burley)


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