Re: compilation note -> style-warning?

Raymond Toy <[email protected]>
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
Nicolas Neuss wrote:
> 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?)

I think changing the efficiency notes (and the boxing notes in
particular) to be an efficiency-warning would not be hard.  Making
efficiency-warning not be a subtype of style-warning is easy too.

But I have not given any thought about the implications of such a hierarchy.

Ray
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.