From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Haertel Message-Id: <200107140752.f6E7qEG04063@ducky.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] compiler bug In-Reply-To: <20010714053945.A96FE199C1@mail.cse.psu.edu> Date: Sat, 14 Jul 2001 00:52:14 -0700 Topicbox-Message-UUID: cd6c9d6a-eac9-11e9-9e20-41e7f4b1d025 >Does this still apply if a type has been explicitly requested with a >suffix? Eg, is the type of 0x100000000000L "long" because of the suffix, >or "long long" because it won't fit in anything smaller? (assuming 32 >bit longs). That becomes a long long because it won't fit anything smaller. Here is a table, laboriously typed in by hand from the standard (with abbreviations courtesy of me being a lazy bum). For those who might care, the table comes from section 6.4.4.1, integer constants, on page 56 of the C99 standard. For each combination of suffix and type of constant, this table it gives the sequence of types that will be tried to fit the constant. Suffix Decimal Constant Hex/Octal Constant ================================================================== none int, long, long long int, u. int, long, u. long, long long, u. long long U u. int, u. long, u. long long u. int, u. long, u. long long L long, long long long, u. long, long long, u. long long UL u. long, u. long long u. long, u. long long ll long long long long, u. long long ull u. long long u. long long You can download a PDF of the C99 standard for $18 from ANSI at: http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI%2FISO%2FIEC+9899%2D1999 Mike