aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-03-28 21:17:14 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 20:59:53 -0700
commit883e0c2829dce58799e29a1ff9a80a983ca61bcc (patch)
tree1efc53afa3c17c16fc928b12a14c1c9131e37c52 /expression.h
parentTake note of modifiers at the end of integer constants, (diff)
downloadsparse-883e0c2829dce58799e29a1ff9a80a983ca61bcc.tar.gz
sparse-883e0c2829dce58799e29a1ff9a80a983ca61bcc.tar.bz2
sparse-883e0c2829dce58799e29a1ff9a80a983ca61bcc.zip
Fix up integer constants to match magic rule: a normal decimal
integer that is too long to fit in an 'int' will be promoted to 'long' even if it were to fit in 'unsigned int'. But hex and octal numbers stay as 'unsigned int' if they fit. In other words, on a 32-bit architecture with a 32-bit long, the constant '2147483648' gets implicitly converted first to 'long' because it doesn't fit in an 'int', and then to 'unsigned long' because it doesn't fit in a 'long' either. But the hex constant 0x80000000 (which has the same value), will get converted to just an 'unsigned int'. Whee.
Diffstat (limited to 'expression.h')
0 files changed, 0 insertions, 0 deletions