Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
GCC undefined behaviors are getting wild
(
pkh.me
)
9 points
by
ux
on Nov 27, 2022
|
hide
|
past
|
favorite
|
3 comments
suprjami
on Nov 27, 2022
|
next
[–]
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
on Nov 28, 2022
|
prev
|
next
[–]
This is a great writeup on what's possible with undefined behavior
https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=63...
xeeeeeeeeeeenu
on Nov 27, 2022
|
prev
[–]
If you want signed integer overflow to be defined, use the "-fwrapv" flag.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: