From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gordon Hogan To: 9fans@cse.psu.edu Subject: Re: [9fans] compiler bug MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20010714053945.A96FE199C1@mail.cse.psu.edu> Date: Sat, 14 Jul 2001 01:39:42 -0400 Topicbox-Message-UUID: cd5f9e30-eac9-11e9-9e20-41e7f4b1d025 > prints -1. It should print 1. According to ANSI C (either version, > take your pick: c89, section 3.1.3.2, or c99, section 6.4.4.1) hex > and octal constants take on the first type in the list: int, unsigned > int, long, unsigned long, etc. in which their value is representable. 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). This isn't an idle question, I've been looking at lex.c and thinking about how best to make it "conformant". (Time to get myself a copy of that standard, already!).