# Standards discussion and tool trends for reducing undefined behavior in C

- Link: https://lwn.net/Articles/1095811/
- Discussion: https://startupxo.com/en/894/
- Posted by startupxo at 2026-10-09T04:37:51.691Z
- 0 points, 0 comments, kind story, origin curated
- Written in ko, machine translated to en

## Summary

- Undefined behavior in C refers to code situations where the standard does not define the result. According to the source, this is a problem because compilers may perform optimizations that differ from what programmers expect based on it.
- The speaker, Martin Uecker, explained that the C23 standard added a 'no time travel' clause to prevent time-travel-style optimizations. He also said that about 100 of the standard's undefined behaviors were removed in the C2y draft, with 45 of them removed.
- According to the talk, tools for checking code are increasing, including compiler warnings, static analyzers, sanitizers, and formal verification. Memory safety is addressed in three parts: types, space, and time. The speaker's view is that full guarantees require expensive runtime checks or formal verification.
- The source gives an example of splitting it into 0, showing that an optimization that removes a check before a division is allowed in some cases but wrong in others. This is because a function call in between changes the program's behavior.

## Sources

- Hacker News: https://news.ycombinator.com/item?id=50015074 (48 points, 24 comments, checked 2026-10-09T04:36:57Z)

## Comments (0)

No comments yet.

JSON: https://startupxo.com/api/v1/item.json?id=894&lang=en
