diff mbox series

[PATCH/wwwdocs] add uses of @code to coding conventions

Message ID 8a14b657-ecce-ba49-2900-ccf3ebda9f49@gmail.com
State New
Headers show
Series [PATCH/wwwdocs] add uses of @code to coding conventions | expand

Commit Message

Martin Sebor Dec. 13, 2018, 11:34 p.m. UTC
Attached is the update I propose to add to the Spelling,
terminology and markup section of the Coding conventions, to
give guidance for when to use the @code{} Texinfo command.
  I believe this reflects existing (if somewhat inconsistent)
practice.  It's not intended to add a new requirement.

Martin

Comments

Jeff Law Dec. 13, 2018, 11:38 p.m. UTC | #1
On 12/13/18 4:34 PM, Martin Sebor wrote:
> Attached is the update I propose to add to the Spelling,
> terminology and markup section of the Coding conventions, to
> give guidance for when to use the @code{} Texinfo command.
>  I believe this reflects existing (if somewhat inconsistent)
> practice.  It's not intended to add a new requirement.
> 
OK.  And yes, it's just documenting what's supposed to be standard
practice rather than adding new requirements.


Jeff
diff mbox series

Patch

Index: htdocs/codingconventions.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/codingconventions.html,v
retrieving revision 1.90
diff -u -r1.90 codingconventions.html
--- htdocs/codingconventions.html	1 Dec 2018 17:19:36 -0000	1.90
+++ htdocs/codingconventions.html	13 Dec 2018 23:34:00 -0000
@@ -569,6 +569,17 @@ 
   required if the capital letter is within <code>@code</code> or
   <code>@samp</code>.)</li>
 
+  <li>Use <code>@code</code> for an expression in a program, for the name
+  of a variable or function used in a program, or for a keyword in
+  a programming language.  However, avoid <code>@code</code> in uses
+  of language keywords as adjectives.  For example, appropriate uses
+  of <code>@code</code> are in phrases such as
+  <i>"<code>@code{const}</code>-qualified type"</i>, or
+  <i>"<code>@code{asm}</code> statement"</i>, or
+  <i>"function returns <code>@code{true}</code></i>".
+  Examples where <code>@code</code> should be avoided are phrases such as
+  <i>"const variable"</i>, <i>"volatile access"</i>, or
+  <i>"condition is false."</i></li>
 </ul>