public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Pedro Alves <palves@redhat.com>,
	Bernd Schmidt <bschmidt@redhat.com>,
	Trevor Saunders <tbsaunde@tbsaunde.org>
Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org,
	Gerald Pfeifer <gerald@pfeifer.com>
Subject: [wwwdocs, coding conventions] Mention OVERRIDE/FINAL
Date: Fri, 01 Jan 2016 00:00:00 -0000	[thread overview]
Message-ID: <1476480483.10766.46.camel@redhat.com> (raw)
In-Reply-To: <0c78b409-efcc-3c49-4323-699e7ecfb6a0@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On Fri, 2016-10-14 at 16:27 +0100, Pedro Alves wrote:
> On 10/12/2016 03:13 PM, Bernd Schmidt wrote:
> > On 10/12/2016 04:09 PM, Pedro Alves wrote:
> > > 
> > > Thanks.  Here's a follow up patch that I was just testing.
> > > 
> > > Need this if building with "g++ -std=gnu++11", with gcc < 4.7.
> > 
> > Lovely. That's ok too if the other one goes in.
> 
> 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.
> 
> Thanks,
> Pedro Alves

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?

[-- Attachment #2: www-use-OVERRIDE-and-FINAL.patch --]
[-- Type: text/x-patch, Size: 814 bytes --]

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>

  reply	other threads:[~2016-10-14 21:28 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       ` 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                 ` David Malcolm [this message]
2016-01-01  0:00                   ` [wwwdocs, coding conventions] Mention OVERRIDE/FINAL Pedro Alves
2017-01-01  0:00                   ` Gerald Pfeifer
2017-01-01  0:00                     ` Trevor Saunders
2017-01-01  0:00                   ` Gerald Pfeifer
2016-01-01  0:00       ` [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h Pedro Alves
2016-01-01  0:00 ` 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
2016-01-01  0:00 ` [PATCH 2/2] jit: use FINAL and OVERRIDE throughout David Malcolm
2016-01-01  0:00   ` David Malcolm

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=1476480483.10766.46.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=bschmidt@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=jit@gcc.gnu.org \
    --cc=palves@redhat.com \
    --cc=tbsaunde@tbsaunde.org \
    /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).