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, coding conventions] Mention OVERRIDE/FINAL


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).

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>

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