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]

Patch to document ISALPHA etc. convention


Recent discussion e.g. 
<http://gcc.gnu.org/ml/fortran/2005-01/msg00084.html> illustrated that the 
use of ISALPHA etc. in place of isalpha etc. isn't documented.  This patch 
adds an explanation in codingconventions.html.  OK to commit?

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)

Index: codingconventions.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/codingconventions.html,v
retrieving revision 1.39
diff -u -r1.39 codingconventions.html
--- codingconventions.html	24 Nov 2004 07:34:52 -0000	1.39
+++ codingconventions.html	25 Jan 2005 22:59:06 -0000
@@ -156,6 +156,12 @@
 compiler can reasonably carry on after the error, they may be
 conditioned on <code>--enable-checking</code>.</p>
 
+<p>Code testing properties of characters from user source code should
+use macros such as <code>ISALPHA</code> from <code>safe-ctype.h</code>
+instead of the standard functions such as <code>isalpha</code> from
+<code>&lt;ctype.h&gt;</code> to avoid any locale-dependency of the
+language accepted.</p>
+
 <p>Code in GCC should use the following formatting conventions:</p>
 
 <table cellpadding="4">


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