This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Trivial cleanup
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Andrew MacLeod <amacleod at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 Sep 2013 21:31:10 +0200
- Subject: Re: [PATCH] Trivial cleanup
- Authentication-results: sourceware.org; auth=none
- References: <5243025E dot 8050101 at redhat dot com> <52430544 dot 8030005 at redhat dot com> <20130925160430 dot GC30970 at tucnak dot zalov dot cz> <524336EE dot 6070402 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Sep 25, 2013 at 01:18:06PM -0600, Jeff Law wrote:
> On 09/25/2013 10:04 AM, Jakub Jelinek wrote:
> >On Wed, Sep 25, 2013 at 11:46:12AM -0400, Andrew MacLeod wrote:
> >>I noticed that with the wrapper conversion, often you will get a
> >>sequence of 3 or more method calls, and its quite unbearable to have
> >>the spaces.
> >>simple things like
> >> int unsignedsrcp = ptrvar.type().type().type_unsigned();
> >> int unsignedsrcp = ptrvar.type ().type ().type_unsigned ();
> >>I was going to bring it up at some point too. My preference is
> >>strongly to simply eliminate the space on methods...
> >My preference is to keep the spaces, it makes code more readable,
> >no space before ( looks very ugly to me.
> I generally find the lack of a space before the open-paren ugly as
> well, but I find something like Andrew's example with the horizontal
> spaces insanely bad.
Then perhaps we don't want the above style and write
int unsignedsrcp = type_unsigned (type (type (ptrvar)));
instead? If we really need to have C++ uglification everywhere, perhaps
template <typename T>
type (T t)
return t.get_type (t);