Raymond Toy <[EMAIL PROTECTED]> writes:
>>>>>> "Nicolas" == Nicolas Neuss <[EMAIL PROTECTED]> writes:
>
> Nicolas> Hello, in the following code a compilation note (returning
> Nicolas> of double) triggers also a style-warning. Is this intended?
> Nicolas> (I cannot see how to improve the style...)
>
> Not sure. Maybe compilation notes like this should not be a
> style-warning. It's really an efficiency note, but currently
> efficiency notes are also style-warnings. Would an
> efficiency-warning, which would be a subtype of style-warning work for
> you?
This issue shows up in my Femlisp test suite when runtime-compiling some
scalar-product operation. My test function looks like this at the moment
(defun test-function (func)
(catch 'trap
(handler-bind
((serious-condition
#'(lambda (condition) (throw 'trap condition)))
#-(or cmu scl)
(warning
#'(lambda (condition) (throw 'trap condition))))
(funcall func)
nil)))
So you see that I can live with the current behaviour, but it would be nice
if I could drop the conditional for CMUCL. For me, the best thing would be
if efficiency notes would not be style warnings, although I understand that
this might be a too large change for a minor improvement. (Is that
subtyping at least useful in some other situation?)
Regards,
Nicolas
> (I think there might also a small bug. The note is a compiler-note,
> but the routine that generates it is called
> do-coerce-efficiency-note.)
>
> Ray