What's the difference between an integer and a pointer? (blog.regehr.org)

32 points by germanrabbit 2 days ago

8 comments:

by glitchc 7 minutes ago

I don't think GCC is doing something special, rather that -O3 might be optimizing out the subtraction. Try with -O0, I suspect you will get the same result as clang.

by bryanlarsen 16 minutes ago

Pointers have provenance, integers don't.

by pjmlp 43 minutes ago

2018, and some of the comments are already outdated, SPARK 2014 is out there with ownership model.

by hn_submit 24 minutes ago

Context.

by stronglikedan 8 minutes ago

well, their names, for starters...

by spwa4 12 minutes ago

There is no difference.

Yes, I'm a C programmer, how did you know?

by Ohentis 2 minutes ago

It doesn't sound like you are or you would know C doesn't define either precisely enough to make that statement true.

by drfloyd51 8 minutes ago

You should read TFA.

Data from: Hacker News, provided by Hacker News (unofficial) API