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


Reply via email to