gbranden pushed a commit to branch master
in repository groff.

commit b8f88aaad8ceb83617cf119be2dc263a0c0dfcff
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun May 31 06:01:52 2026 -0500

    [eqn]: Fix code style nit. (2/2)
    
    * src/preproc/eqn/lex.cpp: Add `extern` declarations of `yylex()` and
      `yyerror()` since--as I understand it--there is still no standard
      header file that prototypes them.
    
    Fixes `-Wmissing-declarations` GCC warning.
---
 ChangeLog               | 8 ++++++--
 src/preproc/eqn/lex.cpp | 4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4b7e73625..ed9d09f84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,8 +10,12 @@
        (do_gifont, do_grfont, do_gbfont, do_space, do_ifdef, do_delim)
        (do_chartype, do_set, do_reset):
        * src/preproc/eqn/text.cpp (special_to_entity): Define functions
-       as `static`; external linkage is not required.  Also fixes
-       `-Wmissing-declarations` GCC warning.
+       as `static`; external linkage is not required.
+       * src/preproc/eqn/lex.cpp: Add `extern` declarations of
+       `yylex()` and `yyerror()` since--as I understand it--there is
+       still no standard header file that prototypes them.
+
+       Fixes `-Wmissing-declarations` GCC warning.
 
 2026-05-30  G. Branden Robinson <[email protected]>
 
diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp
index 392cd734b..4e2370a1d 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -1175,6 +1175,8 @@ static void do_reset()
   reset_param(param.contents());
 }
 
+extern int yylex(void);
+
 int yylex()
 {
   for (;;) {
@@ -1262,6 +1264,8 @@ void lex_error(const char *message,
                             arg3);
 }
 
+extern void yyerror(const char *);
+
 void yyerror(const char *s)
 {
   char *filename;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to