g() cannot be 1, I think, unless the implementation-defined size_t -> ptrdiff_t conversion never results in a negative value
-
-
Define "better". If you want to program in something other than C, there's plenty of options. There's no excuse for breaking C.
-
I mean better than writing a compiler that produces output 100-1000x slower that's useless except as a way to express disagreement w/C.
-
I disagree with your premise, but it's too long for twitter.
-
And as I said at the start, typecasting them to longs works just fine. http://www.unix.org/whitepapers/64bit.html …
-
It doesn't. If (32-bit) p=0x7fffffff, q=0x80000000 (same array), q-p is perfectly well-defined but (long)q-(long)p is not.
-
In linux that address range is allocated to the kernel, longs wrap around when you don't break the compiler, and unsigned long exists.
-
(1) No, varies by arch; 32-bit x86 kernel has 0xc0000000+ reserved. Some archs are 0x80000000+ resv'd. 32-bit on x86_64 kernel = no resv'd.
-
(2) It's not broken but whatever, (3) unsigned long works if you want to assume address model. This precludes all advanced, safe C impls.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.