efriedma-quic wrote:

Sorry, I haven't touched this part of the C standard in a while... I should 
have spotted that.

Whether the compiler's initialization counts as initialization isn't really 
important; "the value becomes indeterminate each time the declaration is 
reached" covers us.

But say you make the test slightly more complicated:

```
int f() {
  int b = 0;
BEGIN:;
goto CONT;
  int *p;
CONT:
  if (b)
    *p = 10;
  p = &b;
  if (!b) {
    b = 1;
    goto BEGIN;
  }
  return b;
}
```

In this form, the declaration is never reached, so the whole sentence is 
irrelevant.

https://github.com/llvm/llvm-project/pull/181937
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to