This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Add unit test to aarch64 prologue analyzer


On 11/30/2016 07:30 PM, Luis Machado wrote:

> Should the curly braces both be on their own lines as the rest of the
> uses? I see mixed formatting in the uses of namespace we currently have.
> We should pick one and go with it.
> 
> I particularly dislike the curly brace on the same line being used to
> GNU's coding standards.

Looking at the GCC codebase, the style with trailing { on the same
line (my preferred) is prevalent:

 $ grep "^namespace " gcc/* | grep "{$" | wc -l
 282
 $ grep "^namespace " gcc/* | grep -v "{$" | wc -l
 28

That style lends itself to opening nested namespaces more
like a FQN, like:

 namespace foo { namespace bar {

With C++17, we'll be able to write:

 namespace foo::bar {

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]