TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

UB? In My Lexer? [pdf]

8 pointsby weirdsmileyalmost 2 years ago

2 comments

weirdsmileyalmost 2 years ago
“UB? In my lexer?” by Corentin Jabot removes the possibility that just tokenizing C++ code can be a source of undefined behavior in a C++ compiler itself. (Did you know it could be UB? Now it can’t.) Note however that this does not remove all possible UB during compilation; future papers may address more of those compile-time UB sources. ~ Herb Sutter
josephcsiblealmost 2 years ago
&gt; Further work will be needed to remove all undefined behavior in [cpp].<p>The inclusion of this sentence makes me seriously question the author&#x27;s qualifications. Removing all UB from C++ would be a terrible thing to do that would greatly slow down all C++ programs. If people using C++ were okay with such a slowdown, they&#x27;d be using a higher-level language already instead.
评论 #36396698 未加载