This seems like a good suggestion.
--8<---------------cut here---------------start------------->8---
diff --git a/doc/standards.texi b/doc/standards.texi
index 30592c65..da17d736 100644
--- a/doc/standards.texi
+++ b/doc/standards.texi
@@ -3,7 +3,7 @@
@setfilename standards.info
@settitle GNU Coding Standards
@c This date is automagically updated when you save this file:
-@set lastupdate August 17, 2021
+@set lastupdate October 13, 2024
@c %**end of header
@dircategory GNU organization
@@ -407,10 +407,13 @@ @node Standard C
use these features if GCC supports them, when they give substantial
benefit.
-However, it is easy to support pre-standard compilers in most programs,
-so if you know how to do that, feel free.
-
@cindex function prototypes
+Previously, this document recommended using pre-standard style of
+function definition, however, C23 has entirely removed unprototyped
+definitions, and compilers that do not support the standard style of
+function definition are few and far between. Due to this, it is no
+longer worth the trouble to support such pre-standard compilers.
+
I would remove the last sentence, it doesn't serve much point I think?
Maybe add "If however you need to support such compilers, you can do
in the following manner." or some such?
To support pre-standard C, instead of writing function definitions in
standard prototype form,
The usage of past tense in the later parts of the chapter seem
incorrect grammatically?
@@ -421,7 +424,7 @@ @node Standard C
@end example
@noindent
-write the definition in pre-standard style like this,
+definitions were written in pre-standard style like this,
@example
int
@@ -431,16 +434,14 @@ @node Standard C
@end example
@noindent
-and use a separate declaration to specify the argument prototype:
+and used a separate declaration to specify the argument prototype:
@example
int foo (int, int);
@end example
You need such a declaration anyway, in a header file, to get the benefit
-of prototypes in all the files where the function is called. And once
-you have the declaration, you normally lose nothing by writing the
-function definition in the pre-standard style.
+of prototypes in all the files where the function is called..
This technique does not work for integer types narrower than @code{int}.
If you think of an argument as being of a type narrower than @code{int},
--8<---------------cut here---------------end--------------->8---
I've edited the "To support pre-standard C..." sentence to be in a past
tense to indicate that this /used to/ be practice (and to preserve the
knowledge of how it happened), and removed "normally lose nothing"
because it is no longer true (C23 entirely removes the construct, so
programs using it will have trouble with strict C23 compliance
eventually), as well as adding a clarification paragraph.
It is likely that GCC will keep supporting this style of function
definition, but given that C won't, and that it is more likely that one
would use a standard than pre-standard CC nowadays, I think I'm
justified in saying "no longer worth the trouble".
I'm not sure if I respected the linguistic conventions of this document
correctly, but from a quick scan it seems OK.
WDYT?
--
Arsen ArsenoviÄ
[2:application/pgp-signature Show Save:signature.asc (381B)]