]> Savannah Git Hosting - gnulib.git/commit
gnulib-common: update for C2x 2020-12-11 draft
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Jul 2021 19:56:24 +0000 (12:56 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 Jul 2021 19:00:34 +0000 (12:00 -0700)
commit786bb6fb17d698eb175942606db8fb129e231474
tree531d2f0f261eb9540f454a650ee78a8915139a51
parentc44470fb95020b371e31202bf2884ca021b3dd73
gnulib-common: update for C2x 2020-12-11 draft

Use blessed-by-draft-standard way to test for [[__deprecated__]]
etc.; this is supported by GCC 11 and the fallback code should
work fine with GCC 10 and earlier, clang, etc.
* NEWS, doc/attribute.texi:
Mention that DEPRECATED etc. must now come first.
* lib/fflush.c, lib/unistr.in.h:
Do not include unused-parameter.h.  All uses of _GL_UNUSED_PARAMETER
(after parameters) replaced by _GL_ATTRIBUTE_MAYBE_UNUSED (before
parameters).  Although perhaps we need a shorter name for
_GL_ATTRIBUTE_MAYBE_UNUSED, that should probably be in
gnulib-common.m4, due to the ubiquity of this issue.
And perhaps the snippet/unused-parameter module should be marked
obsolete since it's no longer compatible with its old use.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro
_GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in
deciding whether to use C2x attributes like [[__deprecated__]].
(_GL_ATTRIBUTE_MAYBE_UNUSED): Fall back on _GL_ATTRIBUTE_UNUSED.
(_GL_ATTRIBUTE_UNUSED): New macro, for labels where C2x
[[maybe_unused]] do not work.
(_GL_UNUSED, _GL_UNUSED_LABEL): Use it.
* modules/fflush, modules/unistr/base (Depends-on):
Remove snippet/unused-parameter.
* modules/fflush (selinux/selinux.h, selinux/context.h)
(selinux/label.h): Do not use $(UNUSED_PARAMETER).
Remove useless chmod a-x.
40 files changed:
ChangeLog
NEWS
doc/attribute.texi
lib/anytostr.c
lib/bitset.c
lib/bitset/array.c
lib/bitset/list.c
lib/bitset/stats.c
lib/bitset/table.c
lib/bitset/vector.c
lib/fflush.c
lib/fts_.h
lib/gl_anylinked_list2.h
lib/gl_anytree_list2.h
lib/gl_anytree_omap.h
lib/gl_anytree_oset.h
lib/gl_array_list.c
lib/gl_array_omap.c
lib/gl_array_oset.c
lib/gl_carray_list.c
lib/gl_list.h
lib/gl_map.h
lib/gl_omap.h
lib/gl_oset.h
lib/gl_set.h
lib/hamt.h
lib/hash.h
lib/inttostr.h
lib/safe-alloc.h
lib/se-context.in.h
lib/se-label.in.h
lib/se-selinux.in.h
lib/unistr.in.h
lib/unused-parameter.h
m4/gnulib-common.m4
modules/fflush
modules/selinux-h
modules/unistr/base
tests/test-asyncsafe-linked_list-weak.c
tests/test-ignore-value.c