2 ms·
The C standard specifies that there is a constant UINTPTR_MAX.
by tedunangst 4y ago
The C standard specifies that there is a constant UINTPTR_MAX.
- addaon 4y agoYes. But, as I mention in the proposed implementation, this limits the number of unique addresses in an implementation. Values that do not need addresses do not consume this limited resource. There would be a limit on the number of items on the stack that can have their address taken, but I can't see why this would limit the number of items on the stack. In e.g. the fizzbuzz implementation mentioned in another comment [1], even without tail call optimization the stack growth implied by the recursive call does not require the number of /addressed/ items on the stack to grow. (Thinking about it, I believe this is an equivalent statement to "the tail call optimization is valid.") [1] https://old.reddit.com/r/C_Programming/comments/qqazh8/fizzbuzz_contained_entirely_within_the_parameter/ https://old.reddit.com/r/C_Programming/comments/qqazh8/fizzb...