|
From: | Paul Eggert |
Subject: | Re: Making _Noreturn a no-op in < Clang 16? |
Date: | Wed, 18 Jan 2023 20:17:39 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 |
The problem we found in Gawk was that this sort of function call: (b ? f : g) (x)is mishandled by Clang < 16 when one function is _Noreturn and the other isn't, in that Clang mistakenly treats the call as if both functions are _Noreturn.
I expect this sort of issue to be reasonably rare in practical C code, as most people don't write code like the above, and when they do then typically F is _Noreturn if and only if G is also _Noreturn. So I've held off on doing the more-drastic "#define _Noreturn /*empty*/" for Clang < 16 in Gnulib, as my guess has been that the advantages of enabling _Noreturn on Clang < 16 are greater than the disadvantages given the rarity of situations like the above.
Of course I could be wrong....
[Prev in Thread] | Current Thread | [Next in Thread] |