Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: bart again (UCX64) Date: Sun, 03 Sep 2023 02:23:04 -0700 Organization: A noiseless patient Spider Lines: 17 Message-ID: <86v8crr4p3.fsf@linuxsc.com> References: <557bf807-40c7-404b-9242-c26975faa42fn@googlegroups.com> <20230901104426.371@kylheku.com> <20230901114625.198@kylheku.com> <20230901135123.702@kylheku.com> <878r9p7b13.fsf@nosuchdomain.example.com> <87msy46y4n.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="6ef63087f855104b64afdd13e03f4862"; logging-data="909930"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nFHMRoMSk56LWRlqRDU9p8E42Kzat0qg=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:G7zF+i5Lcfh+mjFwHE2b81+HUd4= sha1:SYO8X0YhYvjdV3FRVv48IhncSlQ= Xref: csiph.com comp.lang.c:173732 Keith Thompson writes: [...] > I wouldn't mind if a future edition of the C standard added a > requirement that the } of a non-void function must be unreachable > (with an exception for main()). There are languages that have such > a requirement, and in my limited experience it works pretty well. > > The problem is that such a requirement requires the compiler > to perform control flow analysis that's not otherwise required. > [...] The problem is that in C such a determination cannot be made precisely, for reasons that are both theoretical and practical. Only heuristics are possible, but requirements in the C standard are never stated in terms of heuristics (and rightly so).