Hello All, When running cc1 in verbose mode, the announce_function from gcc/toplevel.c displays the name of the function. However, it never emits any newline characters. As a result, the stderr stream may contains very long lines, which is visually unpleasant and tend to block Emacs when running cc1 -v inside an Emacs buffer (or agdb session inside Emacs).
The attached patch (backbported from the MELT branch, where it is very useful) fixes this issue by adding a newline once every eight identifiers. #### gcc/ChangeLog entry 2011-02-10 Basile Starynkevitch <bas...@starynkevitch.net> * toplev.c (announce_function): Emit newline periodically. ######################## Ok for trunk? Thanks -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***
Index: gcc/toplev.c =================================================================== --- gcc/toplev.c (revision 184084) +++ gcc/toplev.c (working copy) @@ -234,6 +234,12 @@ announce_function (tree decl) { if (!quiet_flag) { + + static long count; + count++; + if (count % 8 == 0) + putc('\n', stderr); + if (rtl_dump_and_exit) fprintf (stderr, "%s ", identifier_to_locale (IDENTIFIER_POINTER (DECL_NAME (decl))));