From: Trevor Saunders <tbsaunde@tbsaunde.org>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: David Malcolm <dmalcolm@redhat.com>,
Bernd Schmidt <bschmidt@redhat.com>, Jeff Law <law@redhat.com>,
Pedro Alves <palves@redhat.com>,
gcc-patches@gcc.gnu.org, jit@gcc.gnu.org
Subject: Re: [wwwdocs, coding conventions] Mention OVERRIDE/FINAL
Date: Sun, 01 Jan 2017 00:00:00 -0000 [thread overview]
Message-ID: <20170204010625.3rh62qxe3iqgxnla@ball> (raw)
In-Reply-To: <alpine.LSU.2.20.1702030932360.2585@anthias.pfeifer.com>
On Fri, Feb 03, 2017 at 09:34:52AM +0100, Gerald Pfeifer wrote:
> On Fri, 14 Oct 2016, David Malcolm wrote:
> > On Fri, 2016-10-14 at 16:27 +0100, Pedro Alves wrote:
> >> FYI, I pushed these in now. I also bootstrapped with the
> >> jit included in the selected languages, and hacked the
> >> jit code a bit to trigger the problems OVERRIDE intends to
> >> catch, just to make sure it still works.
> > I propose that we update our coding conventions to mention the OVERRIDE
> > and FINAL macros in the paragraph that discusses virtual funcs.
> >
> > The attached patch (to the website) does so.
> >
> > OK to commit?
>
> I noticed this one has neither been rejected nor applied.
>
> The patch appears fine wearing my wwwdocs maintainer hat, alas I
> do not feel confident approving it (content-wise).
fwiw I can't think of any big downsides, I guess there's slightly more
work ocassionally when you add a new class that inherits from an old one
and slightly more verbosity, but it definitely seems worth it to me.
Trev
>
> Perhaps something for Jeff (now added) or Bernd?
>
> Gerald
> Index: htdocs/codingconventions.html
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/codingconventions.html,v
> retrieving revision 1.77
> diff -u -p -r1.77 codingconventions.html
> --- htdocs/codingconventions.html 18 Sep 2016 13:55:17 -0000 1.77
> +++ htdocs/codingconventions.html 14 Oct 2016 21:22:44 -0000
> @@ -902,7 +902,10 @@ Its use with data-carrying classes is mo
> <p>
> Think carefully about the size and performance impact
> of virtual functions and virtual bases
> -before using them.
> +before using them. If you do use virtual functions, use the
> +<code>OVERRIDE</code> and <code>FINAL</code> macros from
> +<code>include/ansidecl.h</code> to annotate the code for a human reader,
> +and to allow sufficiently modern C++ compilers to detect mistakes.
> </p>
>
> <p>
next prev parent reply other threads:[~2017-02-04 0:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-01 0:00 [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h David Malcolm
2016-01-01 0:00 ` Pedro Alves
2016-01-01 0:00 ` Jason Merrill
2016-01-01 0:00 ` Pedro Alves
2016-01-01 0:00 ` Trevor Saunders
2016-01-01 0:00 ` Pedro Alves
2016-01-01 0:00 ` Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h (was: Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h) Pedro Alves
2016-01-01 0:00 ` Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h Bernd Schmidt
2016-01-01 0:00 ` Pedro Alves
2016-01-01 0:00 ` Bernd Schmidt
2016-01-01 0:00 ` Pedro Alves
2016-01-01 0:00 ` [wwwdocs, coding conventions] Mention OVERRIDE/FINAL David Malcolm
2016-01-01 0:00 ` Pedro Alves
2017-01-01 0:00 ` Gerald Pfeifer
2017-01-01 0:00 ` Gerald Pfeifer
2017-01-01 0:00 ` Trevor Saunders [this message]
2016-01-01 0:00 ` [PATCH 2/2] jit: use FINAL and OVERRIDE throughout David Malcolm
2016-01-01 0:00 ` David Malcolm
2016-01-01 0:00 ` [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h Jakub Jelinek
2016-01-01 0:00 ` CONSTEXPR macro (was "Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h") David Malcolm
2016-01-01 0:00 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170204010625.3rh62qxe3iqgxnla@ball \
--to=tbsaunde@tbsaunde.org \
--cc=bschmidt@redhat.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gerald@pfeifer.com \
--cc=jit@gcc.gnu.org \
--cc=law@redhat.com \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).