Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
albinofrenchy
on Sept 10, 2017
|
parent
|
context
|
favorite
| on:
Main is usually a function, so when is it not? (20...
This isn't that conclusive of a test -- uninitialized memory is 0 relatively often.
clarry
on Sept 10, 2017
|
next
[–]
https://github.com/gcc-mirror/gcc/blob/4bec7283cda24b180ea7a...
pjscott
on Sept 10, 2017
|
parent
|
next
[–]
Okay,
that
is conclusive. (And I'm pleasantly surprised by how readable GCC's source code is.)
kaushiks
on Sept 10, 2017
|
prev
[–]
This has nothing to do with memory. The x86_64 ABI returns values from functions in the RAX register.
albinofrenchy
on Sept 10, 2017
|
parent
[–]
Sure; same point applies though -- just because 0 happens to be in RAX doesn't mean it's defined behavior.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: