From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] NaN, +Inf, and -Inf, constants?
Date: Sun, 7 Feb 2010 12:01:16 -0800 [thread overview]
Message-ID: <dd6fe68a1002071201n42094728o7f41d7e23faa24d7@mail.gmail.com> (raw)
In-Reply-To: <af298c734424023e1fe904f7bb0708c2@terzarima.net>
[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]
On Sun, Feb 7, 2010 at 2:46 AM, Charles Forsyth <forsyth@terzarima.net>wrote:
> h% cat en.c
> enum{
> Fred= 1.5
> };
> double f = Fred;
> h% 8c -S en.c
> DATA f+0(SB)/8,$(1.50000000000000000e+00)
> GLOBL f+0(SB),$8
> END ,
>
> bug or quirk?
> what do you think?
>
i swear i tested this before i replied...
seems like a bug to me. the spec is pretty clear:
6.7.2.2 Enumeration specifiers
Syntax
[#1]
enum-specifier:
enum identifier-opt { enumerator-list }
enum identifier-opt { enumerator-list , }
enum identifier
enumerator-list:
enumerator
enumerator-list , enumerator
enumerator:
enumeration-constant
enumeration-constant = constant-expression
Constraints
[#2] The expression that defines the value of an enumeration
constant shall be an integer constant expression that has a
value representable as an int.
russ
[-- Attachment #2: Type: text/html, Size: 1909 bytes --]
next prev parent reply other threads:[~2010-02-07 20:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-06 15:38 Tristan Plumb
2010-02-06 15:57 ` erik quanstrom
2010-02-06 17:14 ` Tristan Plumb
2010-02-07 16:12 ` erik quanstrom
2010-02-07 0:06 ` Russ Cox
2010-02-07 10:46 ` Charles Forsyth
2010-02-07 11:05 ` Charles Forsyth
2010-02-07 20:01 ` Russ Cox [this message]
2010-02-07 20:31 ` erik quanstrom
2010-02-07 21:33 ` Charles Forsyth
2010-02-07 22:19 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2010-02-07 22:37 ` erik quanstrom
2010-02-08 16:39 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2010-02-08 18:48 ` Russ Cox
2010-02-07 23:16 ` Bakul Shah
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=dd6fe68a1002071201n42094728o7f41d7e23faa24d7@mail.gmail.com \
--to=rsc@swtch.com \
--cc=9fans@9fans.net \
/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).