9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Gordon Hogan <dhog@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] compiler bug
Date: Sat, 14 Jul 2001 01:39:42 -0400	[thread overview]
Message-ID: <20010714053945.A96FE199C1@mail.cse.psu.edu> (raw)

> 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!).


             reply	other threads:[~2001-07-14  5:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-14  5:39 David Gordon Hogan [this message]
2001-07-14  7:52 ` Mike Haertel
  -- strict thread matches above, loose matches on Subject: below --
2014-05-30 13:03 [9fans] Compiler bug Julius Schmidt
2014-05-30 14:56 ` Charles Forsyth
2001-07-12 13:19 [9fans] compiler bug forsyth
2001-07-12 10:33 forsyth
2001-07-12  6:27 Mike Haertel
2001-07-12 10:21 ` Boyd Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010714053945.A96FE199C1@mail.cse.psu.edu \
    --to=dhog@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).