This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs, coding conventions] Mention OVERRIDE/FINAL
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Bernd Schmidt <bschmidt at redhat dot com>, Trevor Saunders <tbsaunde at tbsaunde dot org>, gcc-patches at gcc dot gnu dot org, jit at gcc dot gnu dot org
- Date: Sun, 22 Jan 2017 10:05:28 +0100 (CET)
- Subject: Re: [wwwdocs, coding conventions] Mention OVERRIDE/FINAL
- Authentication-results: sourceware.org; auth=none
- References: <1462552846-17096-1-git-send-email-dmalcolm@redhat.com> <f0e254d6-6cb0-713b-884c-20b7bf80e605@redhat.com> <8ce94f18-421f-9466-85cf-e17d9caee151@redhat.com> <20160506183345.GK3628@ball> <5b2de202-c6bd-f8fc-3407-45a40ddfe62c@redhat.com> <b40ccecf-e327-c85c-c00f-20607f8fa115@redhat.com> <014f88ec-909b-db46-1213-e9dbb8f14ee4@redhat.com> <ec87abe2-fcd0-c85d-501c-366883bf7fe2@redhat.com> <0c78b409-efcc-3c49-4323-699e7ecfb6a0@redhat.com> <1476480483.10766.46.camel@redhat.com>
Hi David,
On Fri, 14 Oct 2016, David Malcolm wrote:
> 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 saw that Pedro agreed, but none of our global reviewers (such as
Bernd) chimed in.
So, while this looks fine from a pure wwwdocs perspective, I did
not feel comfortable approving it without larger concensus. If
you want to push this, perhaps send a note/request to gcc@ proposing
this?
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>