[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unused parameter warnings
From: |
Bruno Haible |
Subject: |
Re: Unused parameter warnings |
Date: |
Sat, 10 Oct 2020 15:50:25 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; ) |
Marc Nieper-Wißkirchen wrote:
> > And a function that may invoke abort () does "affect observable state".
>
> This description of the a pure function does not seem to be accurate.
> When a function calls another function like abort that is marked with
> _Noreturn in a pure context, for the compiler the function can still
> be pure (but not const). It can eliminate a second call to the
> function with the same parameters. I am pretty sure that the warning
> of GCC in line 938 is correct.
The documentation of ATTRIBUTE_PURE in Gnulib is taken from the GCC
documentation [1][2], therefore if you think it needs to be fixed, it's
through a GCC bug report.
Bruno
[1] https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00105.html
[2]
https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Common-Function-Attributes.html
- Unused parameter warnings, Marc Nieper-Wißkirchen, 2020/10/04
- Re: Unused parameter warnings, Bruno Haible, 2020/10/04
- Re: Unused parameter warnings, Marc Nieper-Wißkirchen, 2020/10/06
- Re: Unused parameter warnings, Bruno Haible, 2020/10/06
- Re: Unused parameter warnings, Marc Nieper-Wißkirchen, 2020/10/07
- Re: Unused parameter warnings,
Bruno Haible <=
- Re: Unused parameter warnings, Marc Nieper-Wißkirchen, 2020/10/10
- Re: Unused parameter warnings, Bruno Haible, 2020/10/10
- Re: Unused parameter warnings, Marc Nieper-Wißkirchen, 2020/10/10
- Re: Unused parameter warnings, Paul Eggert, 2020/10/10
- Re: Unused parameter warnings, Bruno Haible, 2020/10/10
- Re: Unused parameter warnings, Paul Eggert, 2020/10/11
- Re: Unused parameter warnings, Jeffrey Walton, 2020/10/11
- Re: 'const' function attribute, Bruno Haible, 2020/10/13
- Re: 'const' function attribute, Paul Eggert, 2020/10/14
- Re: 'const' function attribute, Bruno Haible, 2020/10/18