Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
peeyek
on July 25, 2016
|
parent
|
context
|
favorite
| on:
Const and Optimization in C
In 2nd paragraph, the author states:
void foo(const int *); ...
> The function foo takes a const pointer, which is a promise from the author of foo that it won’t modify the value of x. Given this information, it would seem the compiler may assume x is always zero, and therefore y is always zero.
Sharlin
on July 25, 2016
[–]
It is clear that the author means "pointer to const" there.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: