diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-28 20:22:02 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-28 20:22:02 +0100 |
commit | dd0ad385c4b7e30052f25c5c09b6db9a81f7e293 (patch) | |
tree | 826973970baabcfabe74ed1e0f4a594e53f80682 /m4/gnulib-common.m4 | |
parent | ca1cd9b39787fe8a2329c77bc60d4a7c3ab2334e (diff) | |
download | gnulib-dd0ad385c4b7e30052f25c5c09b6db9a81f7e293.tar.gz |
Clarify _GL_ATTRIBUTE_NODISCARD code.
Reported by Paul Eggert.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment regarding
_GL_ATTRIBUTE_NODISCARD definition.
Diffstat (limited to 'm4/gnulib-common.m4')
-rw-r--r-- | m4/gnulib-common.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index d632819864..c0181abdc5 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -381,7 +381,10 @@ AC_DEFUN([gl_COMMON_BODY], [ #ifndef _GL_ATTRIBUTE_NODISCARD # if defined __clang__ && defined __cplusplus /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces - a warning. */ + a warning. + The 1000 below means a yet unknown threshold. When clang++ version X + starts supporting [[__nodiscard__]] without warning about it, you can + replace the 1000 with X. */ # if __clang_major__ >= 1000 # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] # endif |