Re: Please explain this compiler note

Stelian Ionescu <[email protected]>
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
On Wed, 2008-11-19 at 16:40 +0100, Didier Verna wrote:
> Hi there,
> 
> considering the compilation of the following file:
> 
> | (declaim (optimize (speed 3)
> | 		   (compilation-speed 0)
> | 		   (safety 0)
> | 		   (debug 0)))
> | 
> | (defstruct mystruct
> |   (slot 1.0 :type single-float))
> 
> 
> I'm not sure I understand why I get this note from the compiler:
> 
> | ; In: DEFSTRUCT MYSTRUCT
> | 
> | ;   (DEFSTRUCT MYSTRUCT
> | ;     (SLOT 1.0 :TYPE SINGLE-FLOAT))
> | ; Note: Doing float to pointer coercion (cost 13) to "<return value>".
> 
> which return value is that ?

The return value of (DEFUN MYSTRUCT-SLOT (OBJECT) ...) : the value of
the slot SLOT is boxed hence the compiler note.

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.


-- Attached file included as plaintext by Listar --
-- File: signature.asc
-- Desc: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEABECAAYFAkkkRa4ACgkQjWsER8+9ASUWHACeNt1HSMGM7xrTZfTp31WM1Vfd
nbwAn3Hs7qAHY6TZAwDcVIpG55cIYoGN
=+Zf5
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.