Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kaba0
3 months ago
|
parent
|
context
|
favorite
| on:
Lesser known tricks, quirks and features of C
It is, an array and a pointer are different types. There could be ways to convert it to a pointer, but it shouldn’t happen at so many places, implicitly.
teo_zero
3 months ago
[–]
Correct. A method to extract a pointer from an array already exists:
int *p = &arr[0];
The mistake is to allow this:
int *p = arr;
uecker
3 months ago
|
parent
[–]
And yet, coding styles do not prohibit it and there is no compiler that has a warning.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: