Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Bang in C

Name: Anonymous 2010-09-25 23:57

unsigned x = 1
((!!x)<<31>>31 produces -1
I just learned that bang causes unsigned values to be interpreted as signed values, anyone know the reasoning behind this?

Name: Anonymous 2010-09-25 23:58

bang?

Name: Anonymous 2010-09-26 0:02

See §6.5.3.3 clause 5 of ISO/IEC 9899:TC2.

Name: Anonymous 2010-09-26 0:05

Name: Anonymous 2010-09-26 0:08

Is there a reason why you used two hoinkys?

Name: Anonymous 2010-09-26 0:09

>>5

That's what she said! LOLOLOL

Name: Anonymous 2010-09-26 0:10

>>6

Hoinky 6!

Name: Anonymous 2010-09-26 1:41

>>4
Please stop giving terrible advice.

Name: Anonymous 2010-09-26 6:12

>>1
Because they had no _Bool yet in their first C compiler. So they decided "why not?"

Name: Anonymous 2010-09-26 10:16

>>8
Never!

Name: Anonymous 2010-12-21 7:16

Don't change these.
Name: Email:
Entire Thread Thread List