Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.std.c Subject: Re: Does reading an uninitialized object have undefined behavior? Date: Wed, 16 Aug 2023 23:13:03 -0700 Organization: A noiseless patient Spider Lines: 37 Message-ID: <867cpu5h8w.fsf@linuxsc.com> References: <87zg3pq1ym.fsf@nosuchdomain.example.com> <87zg3pnuse.fsf@bsb.me.uk> <874jlxozzz.fsf@nosuchdomain.example.com> <87fs5hnipv.fsf@bsb.me.uk> <87a5vpnegz.fsf@nosuchdomain.example.com> <86a5uv95g7.fsf@linuxsc.com> <864jkz7hrm.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="a8782d2d7d1c356e90db8dd7e2df2f84"; logging-data="3867612"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+e/e8EORVq+9QcK5EG/f0/fcG+a8uTOSo=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:JorTpH85F6J4KLQAXF0INg7P6bk= sha1:3LN1xP1tyIj6/O9GQUbX/2pOQdU= Xref: csiph.com comp.std.c:6541 Martin Uecker writes: [some unrelated passages removed] > On Wednesday, August 16, 2023 at 6:06:43?AM UTC+2, Tim Rentsch wrote: > >> Martin Uecker writes: [...] >>> One could still consider the idea that "indeterminate" is an >>> abstract property that yields UB during read even for types >>> that do not have trap representations. There is no wording >>> in the C standard to support this, but I would not call this >>> idea "fundamentally wrong". You are right that this is different >>> to provenance provenance which is about values. What it would >>> have in common with pointer provenance is that there is hidden >>> state in the abstract machine associated with memory that >>> is not part of the representation. With effective types there >>> is another example of this. >> >> I understand that you want to consider a broader topic, and that, >> in the realm of that broader topic, something like provenance >> could have a role to play. I think it is worth responding to >> that thesis, and am expecting to do so in a separate reply (or >> new thread?) although probably not right away. > > I would love to hear your comments, because some people > want to have such an abstract of "indeterminate" and > some already believe that this is how the standard should > be understood already today. I've been thinking about this, and am close (I think) to having something to say in response. Before I do that, thought, let me ask this: what problem or problems are motivating the question? What problems do you (or "some people") want to solve? I don't want just examples here; I'm hoping to get a full list.