https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914
--- Comment #7 from Jan Hubicka ---
The idea is to help developers to annotate i.e. binary tree search function,
which he clearly knows is always to be finite, but compiler can not prove it.
Intentional infinite loops with no side effects writte
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914
--- Comment #6 from Paul Eggert ---
(In reply to Jan Hubicka from comment #5)
> yes, however both const and pure attributes allows compiler to also
> remove the call if return value is unused. So here finiteness matters.
Thanks for mentioning t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914
--- Comment #5 from Jan Hubicka ---
> (In reply to Jan Hubicka from comment #2)
> > The reason why gcc warns is that it is unable to prove that the function is
> > always finite.
>
> I don't see why finiteness matters. If a pure function return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914
Paul Eggert changed:
What|Removed |Added
CC||eggert at cs dot ucla.edu
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914
--- Comment #3 from Bruno Haible ---
(In reply to Jan Hubicka from comment #2)
> The reason why gcc warns is that it is unable to prove that the function is
> always finite. This means that it can not auto-detect pure attribute since
> optimizin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914
--- Comment #2 from Jan Hubicka ---
The reason why gcc warns is that it is unable to prove that the function is
always finite. This means that it can not auto-detect pure attribute since
optimizing the call out may turn infinite program to finit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914
--- Comment #1 from Andrew Pinski ---
*** Bug 109915 has been marked as a duplicate of this bug. ***