<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body text="#000000" bgcolor="#ffffff">
[CC'ing Kent Pitman, just in case he's interested, even<br>
though it's "not his job" any more. Kent, start at the<br>
bottom of this mail, as usual...]<br>
<br>
Sudhir Shenoy wrote:
<blockquote type="cite" cite="mid:A0A7AECE-E161-4364-8E3D-6267EFA4ABD2@gol.com">
<pre wrap="">Hi Gary,
Thanks for that (as always) detailed reply. So, I guess the
declaration was being silently ignored prior to this.
However, in the Hyperspec (under the section on Declaration TYPE,
i.e., Body/d_type.htm), it is explicitly stated (in Notes) that
"(typespec var*) is an abbreviation for (type typespec var*)". </pre>
</blockquote>
Indeed, it does, and that's inconsistent with section 3.3.2, so we have<br>
a problem.<br>
<blockquote type="cite" cite="mid:A0A7AECE-E161-4364-8E3D-6267EFA4ABD2@gol.com">
<pre wrap="">I don't
know if this applies to compound type specifiers but in any case it is
no biggie since I can simply use the longer form everywhere.
</pre>
</blockquote>
Yes, I think that's a good idea.<br>
<blockquote type="cite" cite="mid:A0A7AECE-E161-4364-8E3D-6267EFA4ABD2@gol.com">
<pre wrap="">
Many thanks
Sudhir
On May 26, 2009, at 11:20 AM, Gary Byers wrote:
</pre>
<blockquote type="cite">
<pre wrap="">"(DECLARE (TYPE (UNSIGNED-BYTE 64) FOO))" says that FOO is of type
(UNSIGNED-BYTE 64) within the scope of that declaration.
In some cases, the TYPE declaration specifier can be omitted;
"(DECLARE (FIXNUM FOO)) is shorthand for "(DECLARE (TYPE FIXNUM FOO)".
The spec may be a little unclear about which cases allow this
shorthand;
section 3.3.2 describes a declaration as being something whose CAR
is a "declaration identifier", and the glossary defines a "declaration
identifier" to be one of a predefined set of symbols or a symbol which
specifies a type; it doesn't seem to allow compound type specifiers
(like (UNSIGNED-BYTE 64)) to be used as declaration identifiers,
though
other passages in the spec suggest that they should be allowed here.
(See <a href="http://trac.clozure.com/openmcl/ticket/465" class="moz-txt-link-rfc2396E"><http://trac.clozure.com/openmcl/ticket/465></a>).
I don't think that CCL has ever allowed compound type specifiers to
be used as declaration identifiers. Prior to some changes that Gail
made in the trunk a few weeks ago, it tended to quietly ignore
declarations
that it couldn't make sense of (and that would include cases where a
compound type specifier was being used as shorthand for a TYPE
declaration);
a warning is now signaled in that case.
On Tue, 26 May 2009, Sudhir Shenoy wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Can anyone tell me what the proper declaration for a 64 bit unsigned
integer is? I was using "(declare ((unsigned-byte 64) foo))" which I
am fairly sure worked prior to CCL 1.3 but now I get a compilation
warning and the fasl is not generated. I checked the CLHS and there
doesn't seem to be an upper bound on the number of bits in the
unsigned-byte declaration.
I have this in some low level i/o conversion (reading in a IEEE float
value of 8 bytes and converting to a Lisp number) code where I use
(ldb (byte 1 63) foo) to extract the sign-bit, for example. Is
there a
better way to do this?
Thanks
Sudhir
_______________________________________________
Openmcl-devel mailing list
<a href="mailto:Openmcl-devel@clozure.com" class="moz-txt-link-abbreviated">Openmcl-devel@clozure.com</a>
<a href="http://clozure.com/mailman/listinfo/openmcl-devel" class="moz-txt-link-freetext">http://clozure.com/mailman/listinfo/openmcl-devel</a>
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Openmcl-devel mailing list
<a href="mailto:Openmcl-devel@clozure.com" class="moz-txt-link-abbreviated">Openmcl-devel@clozure.com</a>
<a href="http://clozure.com/mailman/listinfo/openmcl-devel" class="moz-txt-link-freetext">http://clozure.com/mailman/listinfo/openmcl-devel</a>
</pre>
</blockquote>
</body>
</html>