This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] minor readability tweaks to print_node
- From: Jeff Law <law at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Aug 2017 10:17:38 -0600
- Subject: Re: [PATCH] minor readability tweaks to print_node
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8F5C28535D
- References: <email@example.com>
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
> 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.
> * print-tree.c (print_node): Print location using the established
> format %s:%i%i.
> Replace spaces with colons.
> (debug_raw, debug): Ditto.