Hi Joseph, Martin, Thomas,
I've been looking at the code that diagnoses non-matching array
parameters in different function declarators (to base my code for
forward declarations of parameters within the same function declarator
on that), and have refactored it to make it easier to follow, and also
so that I can hopefully reuse some of it, or at least add a functin that
is very similar to the one for that.
This refactor renames a function, and then splits it into two (one for
what's done inside the loop).
This passed regression testing on my laptop (Debian Sid; amd64); see
below.
I haven't yet written the changelog, as I'd like to make sure you want
it first.
Thomas, you were right. I was comparing one with -j24 with one without
it. This time, I've compared two with -j24, and it worked fine. This
makes it significantly easier to contribute!! :-)
Have a lovely day!
Alex
~~~~~~~~~~~
$ find -type f | grep '\.sum$' | while read f; do diff -u
../.tmp.fwd_incomp_b4/$f <(cat $f); done
--- ../.tmp.fwd_incomp_b4/./gcc/testsuite/objc/objc.sum 2025-09-27
20:42:23.722111718 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.770035975 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:29 2025
+Test run by alx on Sat Sep 27 22:45:57 2025
Native configuration is x86_64-pc-linux-gnu
=== objc tests ===
--- ../.tmp.fwd_incomp_b4/./gcc/testsuite/g++/g++.sum 2025-09-27
21:06:10.316335356 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.774035969 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:29 2025
+Test run by alx on Sat Sep 27 22:45:57 2025
Native configuration is x86_64-pc-linux-gnu
=== g++ tests ===
--- ../.tmp.fwd_incomp_b4/./gcc/testsuite/gcc/gcc.sum 2025-09-27
21:25:14.954406993 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.798035929 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:29 2025
+Test run by alx on Sat Sep 27 22:45:57 2025
Native configuration is x86_64-pc-linux-gnu
=== gcc tests ===
--- ../.tmp.fwd_incomp_b4/./gcc/testsuite/gfortran/gfortran.sum 2025-09-27
21:12:15.205638776 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.822035892 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:29 2025
+Test run by alx on Sat Sep 27 22:45:57 2025
Native configuration is x86_64-pc-linux-gnu
=== gfortran tests ===
---
../.tmp.fwd_incomp_b4/./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.sum
2025-09-27 21:42:41.268194131 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.830035879 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:34 2025
+Test run by alx on Sat Sep 27 22:46:00 2025
Native configuration is x86_64-pc-linux-gnu
=== libstdc++ tests ===
--- ../.tmp.fwd_incomp_b4/./x86_64-pc-linux-gnu/libitm/testsuite/libitm.sum
2025-09-27 20:41:34.019372824 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.834035870 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:28 2025
+Test run by alx on Sat Sep 27 22:45:55 2025
Native configuration is x86_64-pc-linux-gnu
=== libitm tests ===
--- ../.tmp.fwd_incomp_b4/./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.sum
2025-09-27 20:48:57.303296785 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.838035866 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:28 2025
+Test run by alx on Sat Sep 27 22:45:56 2025
Native configuration is x86_64-pc-linux-gnu
=== libgomp tests ===
---
../.tmp.fwd_incomp_b4/./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.sum
2025-09-27 20:41:32.225853138 +0200
+++ /dev/fd/63 2025-09-28 09:59:12.842035857 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Sat Sep 27 20:41:28 2025
+Test run by alx on Sat Sep 27 22:45:55 2025
Native configuration is x86_64-pc-linux-gnu
=== libatomic tests ===
~~~~~~~
Alejandro Colomar (3):
Rename internal function
Fix typo in comment
Factor out helper function
gcc/c-family/c-common.h | 2 +-
gcc/c-family/c-warn.cc | 584 ++++++++++++++++++++--------------------
gcc/c/c-decl.cc | 2 +-
gcc/c/c-parser.cc | 2 +-
4 files changed, 298 insertions(+), 292 deletions(-)
Range-diff against v0:
-: ----------- > 1: 4cddc7e0e2c Rename internal function
-: ----------- > 2: 046a4b7f89b Fix typo in comment
-: ----------- > 3: 5941d89b28d Factor out helper function
--
2.51.0