automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: test: Accommodate C23 compilers


From: Karl Berry
Subject: [automake-commit] branch master updated: test: Accommodate C23 compilers.
Date: Sun, 16 Jun 2024 12:40:59 -0400

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=18912ccdbaebd06dd93beba3b18697576433e79b

The following commit(s) were added to refs/heads/master by this push:
     new 18912ccdb test: Accommodate C23 compilers.
18912ccdb is described below

commit 18912ccdbaebd06dd93beba3b18697576433e79b
Author: Collin Funk <collin.funk1@gmail.com>
AuthorDate: Sun Jun 16 09:40:49 2024 -0700

    test: Accommodate C23 compilers.
    
    From https://bugs.gnu.org/71425.
    
    * t/yacc-deleted-headers.sh: Declare yyparse before use.
    * t/yacc-depend.sh: Likewise.
    * t/yacc-mix-c-cxx.sh: Likewise.
    * t/yacc-d-basic.sh: Likewise. Use void instead of empty parameter
    list.
    * t/yacc-depend2.sh: Likewise.
    * NEWS: mention this.
    * THANKS: add Collin.
---
 NEWS                      | 3 +++
 THANKS                    | 1 +
 t/yacc-d-basic.sh         | 3 ++-
 t/yacc-deleted-headers.sh | 1 +
 t/yacc-depend.sh          | 1 +
 t/yacc-depend2.sh         | 3 ++-
 t/yacc-mix-c-cxx.sh       | 2 ++
 7 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 7aae0f92f..dd8e23cae 100644
--- a/NEWS
+++ b/NEWS
@@ -114,6 +114,9 @@ New in 1.17:
   - tests: avoid some declaration conflicts for lex et al. on SunOS.
     (bug#34151 and others)
 
+  - tests: declare yyparse before use and use (void) parameter lists
+    instead of (), to placate C23. (bug#71425)
+
   - Typos in code and other doc fixes. (bug#68003, bug#68004, et al.)
 
 * Obsolescence:
diff --git a/THANKS b/THANKS
index 804b76727..496378a7a 100644
--- a/THANKS
+++ b/THANKS
@@ -75,6 +75,7 @@ Christina Gratorp               christina.gratorp@gmail.com
 Claudio Fontana                 sick_soul@yahoo.it
 Clifford Wolf                   clifford@clifford.at
 Colin Watson                    cjwatson@ubuntu.com
+Collin Funk                     collin.funk1@gmail.com
 Colomban Wendling               lists.ban@herbesfolles.org
 Dagobert Michelsen              dam@opencsw.org
 Daiki Ueno                      ueno@unixuser.org
diff --git a/t/yacc-d-basic.sh b/t/yacc-d-basic.sh
index cc076148b..df3cfece1 100644
--- a/t/yacc-d-basic.sh
+++ b/t/yacc-d-basic.sh
@@ -49,7 +49,7 @@ cp foo/Makefile.am baz/Makefile.am
 cat > foo/parse.y << 'END'
 %{
 #include "parse.h"
-int yylex () { return 0; }
+int yylex (void) { return 0; }
 void yyerror (const char *s) {}
 %}
 %%
@@ -69,6 +69,7 @@ sed -e 's/parse\.h/y.tab.h/' <foo/parse.y >bar/parse.y
 
 cat > foo/main.c << 'END'
 #include "parse.h"
+extern int yyparse (void);
 int main ()
 {
   return yyparse ();
diff --git a/t/yacc-deleted-headers.sh b/t/yacc-deleted-headers.sh
index 81957eb86..682dd5f5d 100644
--- a/t/yacc-deleted-headers.sh
+++ b/t/yacc-deleted-headers.sh
@@ -68,6 +68,7 @@ END
 
 cat > main1.c << 'END'
 #include "parse1.h"
+extern int yyparse (void);
 int main (void)
 {
   return ZARDOZ + yyparse ();
diff --git a/t/yacc-depend.sh b/t/yacc-depend.sh
index e5ad6870c..1f67ecac4 100644
--- a/t/yacc-depend.sh
+++ b/t/yacc-depend.sh
@@ -48,6 +48,7 @@ END
 
 cat > main.c << 'END'
 #include "foo.h"
+extern int yyparse (void);
 int main(void)
 {
   return yyparse ();
diff --git a/t/yacc-depend2.sh b/t/yacc-depend2.sh
index f0529294e..896b86df4 100644
--- a/t/yacc-depend2.sh
+++ b/t/yacc-depend2.sh
@@ -43,7 +43,7 @@ END
 
 cat > foo.y << 'END'
 %{
-int yylex () { return 0; }
+int yylex (void) { return 0; }
 void yyerror (const char *s) {}
 %}
 %token TOKEN
@@ -54,6 +54,7 @@ END
 
 cat > main.c << 'END'
 #include "foo.h"
+extern int yyparse (void);
 int main(void)
 {
   return yyparse ();
diff --git a/t/yacc-mix-c-cxx.sh b/t/yacc-mix-c-cxx.sh
index d454fe244..021b4223d 100644
--- a/t/yacc-mix-c-cxx.sh
+++ b/t/yacc-mix-c-cxx.sh
@@ -71,6 +71,7 @@ END
 
 cat > 1.c <<'END'
 #include "p.h"
+extern int yyparse (void);
 int main ()
 {
     int new = ZARDOZ;
@@ -80,6 +81,7 @@ int main ()
 END
 
 cat > 2.c <<'END'
+extern int yyparse (void);
 int main ()
 {
     int yyparse ();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]