Victor Yodaiken via llvm-dev
2021-Jun-17 00:32 UTC
[llvm-dev] Provenance is not part of the existing C standard.
RE: In https://lists.llvm.org/pipermail/llvm-dev/2021-June/151199.html C is moving towards a provenance model; you can find the details in this committee TR that Joshua Cranmer linked: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2676.pdf Provenance is not part of the existing C standard. This proposal is by no means a settled issue. It would be interesting to hear what Clang/llvm developers think. Speaking for myself, I think the proposal has interesting ideas, but papers over a lot of difficult issues, lacks motivation, and potentially could have very negative effects on C semantics in its current state. I'd prefer to fix the C standard so that it is possible to write operating systems, malloc, and other important code in standard C before we consider adding such a far reaching change. vy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210616/e8f28c01/attachment.html>
Michael Kruse via llvm-dev
2021-Jun-17 06:57 UTC
[llvm-dev] Provenance is not part of the existing C standard.
Am Mi., 16. Juni 2021 um 19:32 Uhr schrieb Victor Yodaiken via llvm-dev <llvm-dev at lists.llvm.org>:> Provenance is not part of the existing C standard. This proposal is by no means a settled issue. It would be interesting to hear what Clang/llvm developers think. Speaking for myself, I think the proposal has interesting ideas, but papers over a lot of difficult issues, lacks motivation, and potentially could have very negative effects on C semantics in its current state. I'd prefer to fix the C standard so that it is possible to write operating systems, malloc, and other important code in standard C before we consider adding such a far reaching change.Provenance/N2676 is that fix of the C standard. All current C/C++ specifications have wordings that are obviously motivated to make some compiler optimizations possible, but when those are implemented leads to miscompilation of programs that most agree should have worked. The current situation of implementing an optimization and only later finding out that it is bad when someone complains about it is obviously unsatisfying. As a result, the only safe option is to treat a pointer like an integer, but this would also prohibit many optimizations that an optimizing compiler nowadays is expected to do. I am curious, what are those negative effects on semantics that you are referring to? How would you fix the C standard? Michael