in reply to Re^9: [OT] LLP64 .v. LP64 portability
in thread [OT] LLP64 .v. LP64 portability

Of course, that doesn't work.... There's a reason casting is cheap.

And there's a reason why you chose to post a non functional example.

it costs nothing because a (positive) signed N-bit integer will always fit in an unsigned N-bit integer regardless and mean the same thing.

And there is a reason why I belatedly added the highlghted parenthesised bit above despite that I originally omitted it because in the context of this discussion, it doesn't (rather shouldn't) need to be stated. But I knew who I was talking to.

You know that neither snippet could ever make sense, so its use as an example to support your position is pointless. As is further discussion I fear. I thought (hoped) we'd got passed this, but I guess not.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^11: [OT] LLP64 .v. LP64 portability
by ikegami (Patriarch) on Apr 23, 2010 at 06:04 UTC

    it costs nothing because a (positive) signed N-bit integer will always fit in an unsigned N-bit integer regardless and mean the same thing.

    It does cost something: You have to add (size_t) everywhere. The question was about what's gained.
Re^11: [OT] LLP64 .v. LP64 portability
by ikegami (Patriarch) on Apr 23, 2010 at 06:06 UTC
    I asked if could you give an example where it would help. You just repeated an example where it would have absolutely no effect.
Re^11: [OT] LLP64 .v. LP64 portability
by ikegami (Patriarch) on Apr 23, 2010 at 06:07 UTC
    I asked if could you give an example where it would help. You just repeated an example where it would have absolutely no effect.

    (argh, pardon the reposts. My computer has been misbehaving today.)