https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115237

--- Comment #6 from Paul Eggert <eggert at cs dot ucla.edu> ---
(In reply to [email protected] from comment #5)
> The analysis could be more precise and track 'noreturn' calls
> separately from loops not known to terminate and suppress the
> diagnostic in case of presence of the former.  So I'll take it
> as enhancement request for this.

Thanks, that would fix the problem reported here.

PS. As mentioned in bug#109914, because of ISO C23 § 6.8.6.1 ¶ 4, GCC need not
worry about a loop not known to terminate, if the loop's controlling expression
is not a constant expression and its body does not do I/O or access volatile
storage or do synchronization or atomic operations. This could also help
suppress unwanted diagnostics.

Reply via email to