L
Lars Uffmann
Erik said:And you are missing both the dashes and the blankspace
Might be because it's not a sig but a hand-typed personal greeting
Lars
Erik said:And you are missing both the dashes and the blankspace
No diagnostic is required. The behavior is UNDEFINED.
I doubt seriously his compiler makes it unsigned.
I've never seen one that does it.
Most do, as the OP's does, end up with a int or long int
number that doesn't actually represent the literal expressed.
You're correct. I didn't read the next paragraph, [lex.icon]/3,
which states that the code is ill-formed if the literal cannot
be represented.
Hiya James!
Just thought I'd mention it, since Rolf pointed out Suresh
quoted your signature: Your sig is missing a blankspace after
the initial two dashes - newsreaders won't recognize this as a
signature so they could auto-remove it upon responding.
Ah okay - didn't realize you were aware of this - nor did I check yourJames said:We've been through this before. The blank is there when I
enter the text into the post box in Google News. After that...
It interprets 2147483648 as an unsigned long (read James' post again).Thanks Rolf Magnus, so this means that the g++ compiler takes
-2147483648 as unsigned long?
Thanks Rolf Magnus, so this means that the g++ compiler takes
-2147483648 as unsigned long?
Yes. It takes 2147483648 as unsigned long, then applies the unary '-'
operator to it, and the result of that is of the same type.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.