pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pgindent weirdness
Date: Wed, 20 Apr 2011 18:13:29 -0400
Message-ID: <4DAF5A89.1070402@dunslane.net> (raw)
In-Reply-To: <18675.1303334960@sss.pgh.pa.us>
References: <201104202028.p3KKSYX18339@momjian.us>
	<4DAF4AAF.9040709@dunslane.net>
	<18675.1303334960@sss.pgh.pa.us>



On 04/20/2011 05:29 PM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net>  writes:
>> On 04/20/2011 04:28 PM, Bruce Momjian wrote:
>>> So the list of possible additions Andrew supplied are cases where we
>>> never reference those typedefs --- seems like a cleanup opportunity.
>> I think the best cleanup idea is Aidan's, namely is we have declared
>> "typdef struct foo { ... } foo;" we should use "foo" in the code
>> instead of "struct foo". Then the typedef will be referenced, and the
>> code will be cleaner, and we won't run into the pgindent "struct" bug
>> either, so it's a win/win/win.
> We want to do that in any case.  I think that Bruce was suggesting going
> further and actively removing unreferenced struct tags from the
> declaration sites.  I'm less enthused about that.  It would save nothing
> except some probably-unmeasurable amount of compile time, and it'd
> result in a lot of diffs that might come back to bite future
> back-patching efforts.
>
> 			

Well he says not, but in any case I agree there's no great gain from it. 
It's a well established C idiom, and as you pointed out upthread the 
struct tag is just about required for defining recursive structs anyway.

cheers

andrew



view thread (51+ messages)  latest in thread

Message-ID: <4DAF5A89.1070402@dunslane.net>
Permalink:  ../4DAF5A89.1070402@dunslane.net/
Also on:    postgresql.org/message-id/4DAF5A89.1070402@dunslane.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: andrew@dunslane.net, tgl@sss.pgh.pa.us, bruce@momjian.us, robertmhaas@gmail.com
  Subject: Re: pgindent weirdness
  In-Reply-To: <4DAF5A89.1070402@dunslane.net>
  References: <201104202028.p3KKSYX18339@momjian.us> <4DAF4AAF.9040709@dunslane.net> <18675.1303334960@sss.pgh.pa.us> <4DAF5A89.1070402@dunslane.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox