gbranden pushed a commit to branch master
in repository groff.

commit 56f707d1376ab18fdb2e5996d9b5b814421b7abc
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun May 31 07:28:25 2026 -0500

    [pic]: Fix code style nit. (1/2)
    
    * src/preproc/pic/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/pic/lex.cpp | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 82c4df73f..215fbf38d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-05-31  G. Branden Robinson <[email protected]>
+
+       * src/preproc/pic/lex.cpp: Fix code style nit.  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-31  G. Branden Robinson <[email protected]>
 
        [grn]: Give command a proper header file for external symbols.
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index 247ec67e6..f98888fb9 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -1847,6 +1847,8 @@ void do_lookahead()
   }
 }
 
+extern int yylex();
+
 int yylex()
 {
   if (delim_flag) {
@@ -2065,6 +2067,8 @@ void lex_warning(const char *message,
     warning_with_file_and_line(filename, lineno, message, arg1, arg2, arg3);
 }
 
+extern void yyerror(const char *);
+
 void yyerror(const char *s)
 {
   const char *filename;

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

Reply via email to