Hi,
Here's the list of changes in v20:
- Drop changes to support Cc tags in commit messages (but keep the
patch to add support for Link tags).
- Drop the Cc tags from commit 2 (but keep Link tags).
- Remove one _Static_assert() from tests. I think the test is more
readable without it.
- Add space in macro definition.
- Fix changelog for the makefile changes.
- Add patch 4, which adds the pedantic warning for <= C23.
I think this is feature-complete. I have run `make bootstrap`. I
haven't run `make check` yet this time; I'll do that in the following
days.
Have a lovely day!
Alex
Alejandro Colomar (4):
contrib/: Add support for Link: tags
c: Add _Countof operator
c: Add <stdcountof.h>
c: Add -Wpedantic diagnostic for _Countof
contrib/gcc-changelog/git_commit.py | 3 +
gcc/Makefile.in | 1 +
gcc/c-family/c-common.cc | 26 +++++
gcc/c-family/c-common.def | 3 +
gcc/c-family/c-common.h | 2 +
gcc/c/c-decl.cc | 22 +++-
gcc/c/c-parser.cc | 63 +++++++---
gcc/c/c-tree.h | 4 +
gcc/c/c-typeck.cc | 115 +++++++++++++++++-
gcc/doc/extend.texi | 30 +++++
gcc/ginclude/stdcountof.h | 31 +++++
gcc/testsuite/gcc.dg/countof-compile.c | 130 +++++++++++++++++++++
gcc/testsuite/gcc.dg/countof-vla.c | 51 ++++++++
gcc/testsuite/gcc.dg/countof.c | 154 +++++++++++++++++++++++++
14 files changed, 611 insertions(+), 24 deletions(-)
create mode 100644 gcc/ginclude/stdcountof.h
create mode 100644 gcc/testsuite/gcc.dg/countof-compile.c
create mode 100644 gcc/testsuite/gcc.dg/countof-vla.c
create mode 100644 gcc/testsuite/gcc.dg/countof.c
Range-diff against v19:
1: 796c82b0cba ! 1: 0a752a02dd0 contrib/: Add support for Cc: and Link: tags
@@ Metadata
Author: Alejandro Colomar <[email protected]>
## Commit message ##
- contrib/: Add support for Cc: and Link: tags
+ contrib/: Add support for Link: tags
contrib/ChangeLog:
* gcc-changelog/git_commit.py (GitCommit):
- Add support for 'Cc: ' and 'Link: ' tags.
+ Add support for 'Link:' tags.
Cc: Jason Merrill <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
## contrib/gcc-changelog/git_commit.py ##
@@ contrib/gcc-changelog/git_commit.py: CO_AUTHORED_BY_PREFIX =
'co-authored-by: '
-
REVIEW_PREFIXES = ('reviewed-by: ', 'reviewed-on: ', 'signed-off-by: ',
'acked-by: ', 'tested-by: ', 'reported-by: ',
-- 'suggested-by: ')
-+ 'suggested-by: ', 'cc: ')
+ 'suggested-by: ')
+LINK_PREFIXES = ('link: ')
DATE_FORMAT = '%Y-%m-%d'
2: ae4691c8b45 ! 2: c28c880f609 c: Add _Countof operator
@@ Commit message
Suggested-by: Xavier Del Campo Romero <[email protected]>
Co-authored-by: Martin Uecker <[email protected]>
Acked-by: "James K. Lowden" <[email protected]>
- Cc: Joseph Myers <[email protected]>
- Cc: Gabriel Ravier <[email protected]>
- Cc: Jakub Jelinek <[email protected]>
- Cc: Kees Cook <[email protected]>
- Cc: Qing Zhao <[email protected]>
- Cc: Jens Gustedt <[email protected]>
- Cc: David Brown <[email protected]>
- Cc: Florian Weimer <[email protected]>
- Cc: Andreas Schwab <[email protected]>
- Cc: Timm Baeder <[email protected]>
- Cc: Daniel Plakosh <[email protected]>
- Cc: "A. Jiang" <[email protected]>
- Cc: Eugene Zelenko <[email protected]>
- Cc: Aaron Ballman <[email protected]>
- Cc: Paul Koning <[email protected]>
- Cc: Daniel Lundin <[email protected]>
- Cc: Nikolaos Strimpas <[email protected]>
- Cc: JeanHeyd Meneide <[email protected]>
- Cc: Fernando Borretti <[email protected]>
- Cc: Jonathan Protzenko <[email protected]>
- Cc: Chris Bazley <[email protected]>
- Cc: Ville Voutilainen <[email protected]>
- Cc: Alex Celeste <[email protected]>
- Cc: Jakub Ćukasiewicz <[email protected]>
- Cc: Douglas McIlroy <[email protected]>
- Cc: Jason Merrill <[email protected]>
- Cc: "Gustavo A. R. Silva" <[email protected]>
- Cc: Patrizia Kaye <[email protected]>
- Cc: Ori Bernstein <[email protected]>
- Cc: Robert Seacord <[email protected]>
- Cc: Marek Polacek <[email protected]>
- Cc: Sam James <[email protected]>
- Cc: Richard Biener <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
## gcc/c-family/c-common.cc ##
@@ gcc/testsuite/gcc.dg/countof-compile.c (new)
+{
+ int b[n][n];
+
-+ _Static_assert (_Countof (a[f1()]) == 9);
++ _Countof (a[f1()]);
+ _Countof (b[f2()]);
+}
+
3: f4700c6d7dc ! 3: f6ff1f130de c: Add <stdcountof.h>
@@ Commit message
gcc/ChangeLog:
- * Makefile.in
+ * Makefile.in (USER_H): Add <stdcountof.h>.
* ginclude/stdcountof.h: Add countof macro.
Signed-off-by: Alejandro Colomar <[email protected]>
@@ gcc/ginclude/stdcountof.h (new)
+#ifndef _STDCOUNTOF_H
+#define _STDCOUNTOF_H
+
-+#define countof _Countof
++#define countof _Countof
+
+#endif /* stdcountof.h */
-: ----------- > 4: 94bc203a406 c: Add -Wpedantic diagnostic for _Countof
--
2.49.0