Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
klankerzz
on Aug 18, 2023
|
parent
|
context
|
favorite
| on:
A Guide to Undefined Behavior in C and C++ (2010)
Can't you also just say that mmap() is a magical function that you don't know what it does?
For all the compiler knows, mmap()
could
just be a:
static Hash_Table h; return (void *)&h;
And make that the rule for all externally defined functions.
gpderetta
on Aug 18, 2023
[–]
Indeed. That's the way to reason about correctness of opaque functions.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
For all the compiler knows, mmap() could just be a:
And make that the rule for all externally defined functions.