Hi!
I've split these patches from the _Maxof & _Minof patches. The first
patch moves the documentation for the _Countof operator to a more
organized place within the manual. The second patch simplifies
c_parser_unary_expression() after a suggestion from Andrew.
I'll base the _Maxof & _Minof patch on top of these.
This patch set has passed regression testing. See below.
Have a lovely day!
Alex
---
Regression resting:
alx@devuan:~/src/gnu/gcc/countof$ git log --oneline gnu/master..countof1
693d2f075c97 (HEAD -> countof, tag: countof1) c: Refactor
c_parser_unary_expression()
3a44208d2b2f doc: Move _Countof under 'Other Extensions to C Syntax'
alx@devuan:~/src/gnu/gcc/countof$ git reset gnu/master --hard
HEAD is now at 65acf3665ea9 PR modula2/122241: Lack of spellng hints
with simple errors
alx@devuan:~/src/gnu/gcc/countof$ mkdir ../countof1
alx@devuan:~/src/gnu/gcc/countof$ cd ../countof1/
alx@devuan:~/src/gnu/gcc/countof1$ set -o pipefail
alx@devuan:~/src/gnu/gcc/countof1$ ../countof/configure
--disable-multilib --prefix=/opt/local/gnu/gcc/countof |& ts -s | tail -n1;
echo $?
00:00:01 config.status: creating Makefile
0
alx@devuan:~/src/gnu/gcc/countof1$ make -j24 bootstrap |& ts -s | tail
-n1; echo $?
00:23:02 make[1]: Leaving directory '/srv/alx/src/gnu/gcc/countof1'
0
alx@devuan:~/src/gnu/gcc/countof1$ make -j24 check |& ts -s | tail -n1;
echo $?
00:35:49 make[1]: Leaving directory '/srv/alx/src/gnu/gcc/countof1'
0
alx@devuan:~/src/gnu/gcc/countof1$ cd ../countof
alx@devuan:~/src/gnu/gcc/countof$ git merge --ff-only countof1
Updating 65acf3665ea9..693d2f075c97
Fast-forward
gcc/c/c-parser.cc | 89
+++++++++++++++++++++++++------------------------------------
gcc/doc/extend.texi | 62 +++++++++++++++++++++---------------------
2 files changed, 67 insertions(+), 84 deletions(-)
alx@devuan:~/src/gnu/gcc/countof$ cd ..
alx@devuan:~/src/gnu/gcc$ mv countof1/ countof1_b4
alx@devuan:~/src/gnu/gcc$ mkdir countof1
alx@devuan:~/src/gnu/gcc$ cd countof1
alx@devuan:~/src/gnu/gcc/countof1$ ../countof/configure
--disable-multilib --prefix=/opt/local/gnu/gcc/countof |& ts -s | tail -n1;
echo $?
00:00:01 config.status: creating Makefile
0
alx@devuan:~/src/gnu/gcc/countof1$ make -j24 bootstrap |& ts -s | tail
-n1; echo $?
00:22:35 make[1]: Leaving directory '/srv/alx/src/gnu/gcc/countof1'
0
alx@devuan:~/src/gnu/gcc/countof1$ make -j24 check |& ts -s | tail -n1;
echo $?
00:36:07 make[1]: Leaving directory '/srv/alx/src/gnu/gcc/countof1'
0
alx@devuan:~/src/gnu/gcc/countof1$ find -type f | grep '\.sum$' | while
read f; do diff -u ../countof1_b4/$f $f; done;
--- ../countof1_b4/./x86_64-pc-linux-gnu/libitm/testsuite/libitm.sum
2025-10-14 14:00:28.682974038 +0200
+++ ./x86_64-pc-linux-gnu/libitm/testsuite/libitm.sum 2025-10-14
15:56:43.479701336 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:26 2025
+Test run by alx on Tue Oct 14 15:56:40 2025
Native configuration is x86_64-pc-linux-gnu
=== libitm tests ===
---
../countof1_b4/./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.sum
2025-10-14 14:00:27.630360824 +0200
+++ ./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.sum
2025-10-14 15:56:42.428978126 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:26 2025
+Test run by alx on Tue Oct 14 15:56:40 2025
Native configuration is x86_64-pc-linux-gnu
=== libatomic tests ===
--- ../countof1_b4/./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.sum
2025-10-14 14:02:55.970871278 +0200
+++ ./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.sum 2025-10-14
15:58:53.358735326 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:26 2025
+Test run by alx on Tue Oct 14 15:56:40 2025
Native configuration is x86_64-pc-linux-gnu
=== libgomp tests ===
---
../countof1_b4/./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.sum
2025-10-14 14:36:14.276058477 +0200
+++ ./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.sum
2025-10-14 16:32:47.215608018 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:27 2025
+Test run by alx on Tue Oct 14 15:56:42 2025
Native configuration is x86_64-pc-linux-gnu
=== libstdc++ tests ===
--- ../countof1_b4/./gcc/testsuite/objc/objc.sum 2025-10-14
14:01:35.976963581 +0200
+++ ./gcc/testsuite/objc/objc.sum 2025-10-14 15:57:47.310104779
+0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:26 2025
+Test run by alx on Tue Oct 14 15:56:41 2025
Native configuration is x86_64-pc-linux-gnu
=== objc tests ===
--- ../countof1_b4/./gcc/testsuite/g++/g++.sum 2025-10-14
14:17:03.789164163 +0200
+++ ./gcc/testsuite/g++/g++.sum 2025-10-14 16:18:58.688305598 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:26 2025
+Test run by alx on Tue Oct 14 15:56:41 2025
Native configuration is x86_64-pc-linux-gnu
=== g++ tests ===
--- ../countof1_b4/./gcc/testsuite/gcc/gcc.sum 2025-10-14
14:23:27.416796835 +0200
+++ ./gcc/testsuite/gcc/gcc.sum 2025-10-14 16:15:11.473775402 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:26 2025
+Test run by alx on Tue Oct 14 15:56:41 2025
Native configuration is x86_64-pc-linux-gnu
=== gcc tests ===
--- ../countof1_b4/./gcc/testsuite/gfortran/gfortran.sum
2025-10-14 14:13:46.285228759 +0200
+++ ./gcc/testsuite/gfortran/gfortran.sum 2025-10-14
16:04:50.223990189 +0200
@@ -1,4 +1,4 @@
-Test run by alx on Tue Oct 14 14:00:26 2025
+Test run by alx on Tue Oct 14 15:56:41 2025
Native configuration is x86_64-pc-linux-gnu
=== gfortran tests ===
Alejandro Colomar (2):
doc: Move _Countof under 'Other Extensions to C Syntax'
c: Refactor c_parser_unary_expression()
gcc/c/c-parser.cc | 89 ++++++++++++++++++---------------------------
gcc/doc/extend.texi | 62 +++++++++++++++----------------
2 files changed, 67 insertions(+), 84 deletions(-)
-: ------------ > 1: 3a44208d2b2f doc: Move _Countof under 'Other Extensions
to C Syntax'
-: ------------ > 2: 693d2f075c97 c: Refactor c_parser_unary_expression()
--
2.51.0