Didier Verna | 13 Nov 2010 15:34
X-Face
Face
Picon
Picon
Picon
Picon
Gravatar

[Q] Muffling compiler notes


  Hello,

is there a way to locally (inside a specific function) shut up compiler
notes like the following one ?

;   (UNIX:UNIX-IOCTL (SYSTEM:FD-STREAM-FD #) UNIX:TIOCGWINSZ WINSIZE)
; --> WINSIZE ALIEN::LOCAL-ALIEN ALIEN::EXTRACT-ALIEN-VALUE ALIEN::NATURALIZE 
; ==>
;   (ALIEN::%SAP-ALIEN ALIEN:ALIEN '#<ALIEN::ALIEN-RECORD-TYPE #>)
; Note: Unable to optimize because:
;     Could not optimize away %SAP-ALIEN: forced to do runtime 
; allocation of alien-value structure.

With SBCL, you can do this:

(declare (sb-ext:muffle-conditions sb-ext:compiler-note))

Thanks !

--

-- 
Resistance is futile. You will be jazzimilated.

Scientific site:   http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com
_______________________________________________
cmucl-help mailing list
cmucl-help <at> cmucl.cons.org
http://lists.zs64.net/mailman/listinfo/cmucl-help

(Continue reading)

Raymond Toy | 13 Nov 2010 20:35
Picon

Re: [Q] Muffling compiler notes

On 11/13/10 9:34 AM, Didier Verna wrote:
>   Hello,
>
> is there a way to locally (inside a specific function) shut up compiler
> notes like the following one ?
>
> ;   (UNIX:UNIX-IOCTL (SYSTEM:FD-STREAM-FD #) UNIX:TIOCGWINSZ WINSIZE)
> ; --> WINSIZE ALIEN::LOCAL-ALIEN ALIEN::EXTRACT-ALIEN-VALUE ALIEN::NATURALIZE 
> ; ==>
> ;   (ALIEN::%SAP-ALIEN ALIEN:ALIEN '#<ALIEN::ALIEN-RECORD-TYPE #>)
> ; Note: Unable to optimize because:
> ;     Could not optimize away %SAP-ALIEN: forced to do runtime 
> ; allocation of alien-value structure.

Currently, you have two options.  Option 1:  compile with speed < 3. 
Option 2:  use (declare (optimize (ext:inhibit-warnings 3))).  You
could, of course, use either option 1 or 2, wrapped inside a LOCALLY
wrapped around your call to unix-ioctl.

Ray

_______________________________________________
cmucl-help mailing list
cmucl-help <at> cmucl.cons.org
http://lists.zs64.net/mailman/listinfo/cmucl-help


Gmane