On 08/01/2017 07:16 PM, Martin Sebor wrote:
> This is a small readability tweak to the tree printer to have
> it consistently use dashes and colons in tree attribute names
> in favor of spaces.  It's been tested on x86_64-linux.
> 
> The tree printer tends to avoid using spaces to separate tree
> attribute names (not the __attribute__ kind but things like
> needs-constructing or pointer_to_this).  Instead it uses dashes
> and underscores to separate words, and colons to separate integer
> values from the attribute names.
> 
> In a small number of cases it does use a space which can make it
> harder to read.  For instance a FUNCTION_DECL might be rendered
> like so:
> 
>   <function_decl 0x7fffefbde800 g
>      type <...>
>      public external QI file /build/tmp/a.c line 14 col 13 user align 256>
> 
> In the last three attributes "user align 256" it's not completely
> clear whether it's user, followed by align, followed by 256, or
> user-align:256.
> 
> The attached patch replaces the handful of spaces between words
> I noticed with dashes, and between words and numbers with colons.
> It also fixes the above location to use the prevalent
> file:line:column notation.
> 
> Martin
> 
> gcc-print-tree.c.diff
> 
> 
> gcc/ChangeLog:
> 
>       * print-tree.c (print_node): Print location using the established
>       format %s:%i%i.
>       Replace spaces with colons.
>       (debug_raw, debug): Ditto.
OK.


Jeff

Reply via email to