Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 43:17:40 |
Calls: | 422 |
Calls today: | 1 |
Files: | 1,024 |
Messages: | 90,181 |
antispam@fricas.org (Waldek Hebisch) writes:
[...]
Well, it is rather easy to see if variable is used within its
own initialization, so practically it is minor gap. Of course,
there is problem with C standard: IIUC depending on rest of
the code declarations as above are merely undefined behaviour
or even produce unspecified value. So C compiler is
forbidden to stop compilation are report compile time error.
Valid responses to undefined behavior include "terminating a translation
or execution (with the issuance of a diagnostic message)".
In other
words, if a compiler is able to prove that a program has undefined
behavior (that will occur on each execution), it can reject it at
compile time.