On 27 November 2014 at 22:33, Manuel López-Ibáñez <lopeziba...@gmail.com> wrote: > On 27 November 2014 at 20:28, Tobias Burnus <bur...@net-b.de> wrote: >> I think the approach is fine. As the _now version overrides the buffer, one >> might even do with a single buffer by clearing it, setting flush_p >> temporarily to true and printing the message. It only might collide with >> buffered warnings (for error_now) and errors (for warning_now), but I don't >> see whether that's an issue. For warnings/error_now it probably isn't, for >> errors/warning_now, it might. Thus, having two buffers is probably better. > > Oh, I didn't notice that the _now versions override the buffered > messages. Where do you see that? It seems that gfc_warning_1 saves and > restores buffer_flag but does not touch the buffers (it prints > directly to the stream).
I meant gfc_warning_now_1. However, gfc_error_now_1 does reset error_buffer (and sets it as curr_buffer, why if without buffering it is not used?) . Hum, if this is really necessary, I'm afraid I just introduced a subtle bug, since the new gfc_error_now does not reset error_buffer, thus, potentially it may give an error that should have been discarded. Tobias, what do you think?