This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: codingconventions.html update for new intl directory
"Joseph S. Myers" <jsm28@cam.ac.uk> writes:
> On Fri, 4 Jul 2003, Zack Weinberg wrote:
>
>> +<p>GCC is written in ISO C90. Use of features of ISO C99, or GNU
>
> Some non-C front ends use GNU extensions present in 2.95 (though this is
> to be discouraged for the C++ front end). libiberty still uses K&R.
> Some of README.Portability is still relevant for ISO C files, and the rest
> as an illustration of the sort of thing to look out for when converting to
> ISO C.
I understood the status quo to be that use of unguarded GNU extensions
is either forbidden or strongly discouraged, depending on context.
Not just discouraged in C++. It is indeed true that extensions are
used in various places, and that README.Portability is still relevant.
How's this for clarification?
zw
===================================================================
Index: codingconventions.html
--- codingconventions.html 1 Jul 2003 02:46:24 -0000 1.23
+++ codingconventions.html 4 Jul 2003 20:55:31 -0000
@@ -71,15 +71,26 @@ href="http://gcc.gnu.org/ml/gcc/2000-09/
<h2>Portability</h2>
-<p>There are strict requirements for portability of code in GCC to
-older systems whose compilers do not implement the ISO C standard.
-See <a
-href="http://gcc.gnu.org/cgi-bin/cvsweb.cgi/~checkout~/gcc/gcc/README.Portability?content-type=text/plain&only_with_tag=HEAD">README.Portability</a>
-for details of some of the portability problems that may arise. Some
-of these problems are warned about by <code>gcc -Wtraditional</code>,
-which is included in the default warning options in a bootstrap.
-(Code outside the C front end is only compiled by GCC, so such
-requirements do not apply to it.)</p>
+<p>Most of GCC is written in ISO C90. Use of features of ISO C99, or
+GNU extensions, must be properly guarded with preprocessor
+conditionals so that it still compiles and works with other
+compilers.</p>
+
+<p>Some of GCC's source files are still written with the expectation
+that they must be usable with "K+R" (pre-standard) compilers. Patches
+to convert such files to ISO C are welcome. However, please keep the
+style of any given file consistent; do not introduce new-style
+function definitions in a file that currently uses old-style, unless
+you are converting the entire file. (Functions that take a variable
+number of arguments are an exception. They should be written in ISO C
+style even if the rest of the file is still in K+R style.)</p>
+
+<p>Some of GCC's source files make use of GNU extensions without
+proper fallbacks for other compilers. This is strongly discouraged;
+however, as long as the code is neither part of the
+language-independent compiler, nor part of the C front end, it is
+tolerated. Patches to remove unconditional uses of extensions are also
+welcome.</p>
<p>The programs included in GCC are linked with the
libiberty library, which will replace some standard
@@ -103,6 +114,9 @@ system. Exceptions may be made to this
the release cycle, to reduce the risk involved in fixing a problem
that only shows up on one particular system.</p>
+<p>See the file <a href=
+"http://gcc.gnu.org/cgi-bin/cvsweb.cgi/~checkout~/gcc/gcc/README.Portability?content-type=text/plain&only_with_tag=HEAD"><code>gcc/README.Portability</code></a>
+in the tree for further details.
<h2>Makefiles</h2>
@@ -397,6 +411,25 @@ When you check in a patch to one of thes
the src tree too, or ask someone else with CVS write access there to
do so.</li>
+<li>Top-level files ABOUT-NLS and config.rpath: These files are taken
+from <a href="http://www.gnu.org/software/gettext/">GNU gettext</a>,
+which can be downloaded from <a href=
+"ftp://ftp.gnu.org/pub/gnu/gettext/">ftp://ftp.gnu.org/pub/gnu/gettext/</a>.
+Proposed changes should be e-mailed to <a
+href="mailto:bug-gnu-gettext@gnu.org">bug-gnu-gettext@gnu.org</a>.
+Only after the change appears in a released gettext distribution
+should it be installed in the GCC CVS tree.</li>
+
+<li>intl: Most, but not all, of the content of this directory is also
+taken unmodified from GNU gettext. Proposed changes to the unmodified
+files should be sent to the gettext maintainers first. Proposed
+changes to the files that have been modified, or created from scratch,
+should be submitted to gcc-patches normally. See the file <a href=
+"http://gcc.gnu.org/cgi-bin/cvsweb.cgi/~checkout~/gcc/intl/README?content-type=text/plain&only_with_tag=HEAD"><code>intl/README</code></a>
+in the tree for details. Note that new upstream releases of GNU
+gettext cannot be incorporated unmodified; consult the mailing list
+for assistance.</li>
+
<li>fastjar: The master sources are at <a
href="http://fastjar.sourceforge.net/">fastjar.sourceforge.net</a>.
Local patches should be sent upstream, but it's acceptable to check
@@ -419,6 +452,5 @@ FSF website, or are autogenerated. Thes
without prior permission, if at all.</li>
</ul>
-
</body>
</html>