This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [wwwdocs] Update coding conventions for C++


On Mon, 2012-06-25 at 15:17 -0700, Lawrence Crowl wrote:
> On 6/25/12, Joseph S. Myers <joseph@codesourcery.com> wrote:
> > On Mon, 25 Jun 2012, Diego Novillo wrote:
> > > [ Added doc maintainers in CC ]
> > >

> I have added a bit more in the rationale, reached through the link
> at the end of that section.
> 
> > > > +<p>
> > > > +Indent protection labels by one space.
> > > > +</p>
> > > > +
> > > > +<p>
> > > > +Indent class members by two spaces.
> >
> > Do all the listed indentation rules correspond to what a <TAB>
> > will do by default when editing C++ code in GNU Emacs?  If not,
> > we have conflicting notions of GNU C++ indentation conventions.
> 
> I have no idea.  I don't use emacs.  The two-space rule for members
> comes from the wiki.  The one-space rule for protection labels is
> common practice.  If folks want something else, changes are fine
> with me.

Two spaces for members is common practice with GNU, and it seems to be
used for libstdc++.

One space for protection labels is not something I have heard of before
and libstdc++ uses no indentation for them.

A freshly started emacs also doesn't indent access labels.

I do think there is some value in using the same coding style for
libstdc++ and the compiler.

/MF


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