TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

GCC undefined behaviors are getting wild

9 点作者 ux超过 2 年前

3 条评论

suprjami超过 2 年前
I really like the idea of decompiling ones' own code with Ghidra to see different ways the logic can be represented. Using `-Wextra` adds a warning about the signed\unsigned comparison, but Ghidra's `(ulong)(uint)` casts make that a bit clearer.
llimos超过 2 年前
This is a great writeup on what&#x27;s possible with undefined behavior <a href="https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;oldnewthing&#x2F;20140627-00&#x2F;?p=633" rel="nofollow">https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;oldnewthing&#x2F;20140627-00&#x2F;?p=63...</a>
xeeeeeeeeeeenu超过 2 年前
If you want signed integer overflow to be defined, use the &quot;-fwrapv&quot; flag.