{"id":894,"kind":"story","title":"Standards discussion and tool trends for reducing undefined behavior in C","url":"https://lwn.net/Articles/1095811/","host":"lwn.net","by":"startupxo","score":0,"comments":0,"time":"2026-10-09T04:37:51.691Z","origin":"curated","language":{"source":"ko","reading":"en","translated":true},"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."],"discussion":"https://startupxo.com/en/894/","markdown":"https://startupxo.com/en/894.md","api":"https://startupxo.com/api/v1/item.json?id=894&lang=en","text":null,"edited":null,"sources":[{"site":"hn","name":"Hacker News","url":"https://news.ycombinator.com/item?id=50015074","score":48,"comments":24,"observed_at":"2026-10-09T04:36:57Z"}],"thread":[]}