I fixed this one locally a couple of days ago; sorry for not pushing. I'll do that shortly.
I don't think this change is sufficient because if output_sync != &make_sync then make_sync is never dumped with the change below. On Tue, 2014-01-14 at 06:21 +0100, Frank Heckenbach wrote: > Oliver Kiddle wrote: > > > Given the following Makefile, the output from the error function is > > being lost when the gmake 4 output-sync is enabled: > > > > [...] > > With assertions active I even get this error: > > % make -O > make: main.c:3409: die: Assertion `output_context == &make_sync' > failed. > > Aborted > > I tried inserting "OUTPUT_UNSET ();" in func_error(), case 'e'. This > fixes the above problem, but still fails with fatal() called from > other functions, e.g.: > > foo: > echo $(wordlist 0, 0, foo) > > So the problem is more general. ISTM the assumption in die() that > output_context is either NULL or &make_sync is just not valid, since > fatal() can be called from basically anywhere. So I made this change > which seems to fix the problem. > > --- main.c.orig 2014-01-14 05:55:19.000000000 +0100 > +++ make/main.c 2014-01-14 06:14:00.000000000 +0100 > @@ -3406,9 +3406,8 @@ > > if (output_context) > { > - assert (output_context == &make_sync); > + output_close (output_context); > OUTPUT_UNSET (); > - output_close (&make_sync); > } > > output_close (NULL); _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make