[Ecls-list] Detection and handling of compiler conditions

Gabriel Dos Reis gdr at integrable-solutions.net
Fri Aug 22 18:35:44 UTC 2008


On Thu, Aug 21, 2008 at 2:47 PM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> Things have been further simplified so that only three variables
> govern printing of compiler messages. The situation is now as follows.
> I would be very happy if anyone (Gaby?) gave some feedback on these
> changes.
>
>  - The compiler now signals compiler-error, compiler-warning and compiler-note
>   for errors, warnings and notes, respectively.

This categorization looks good to me.

>
>  - Printing of compiler messages is now ruled by *COMPILE-PRINT*,
> *COMPILE-VERBOSE*
>   and *SUPPRESS-COMPILER-MESSAGES*. The latter is either NIL or a
> valid lisp type
>   which denotes which compiler messages are suppressed. If
> *SUPPRESS-COMPILER-MESSAGES*
>   is NIL and *COMPILE-VERBOSE* is NIL, then no messages are shown.

would not it make sense to still print warnings when *COMPILE-VERBOSE* is
nil?

>
>  - *SUPPRESS-COMPILER-NOTES* and *SUPPRES-COMPILER-WARNINGS* are deprecated and
>   will be removed in next release.

I am fine with that.

>
>  - ECL allows the user to set up handlers for different compiler conditions,
>   including errors, warnings and simple notes. The recommended procedure is to
>   use HANDLER-BIND and _NOT_ to transfer control out of the compilation
>   environment, but to defer to the default handlers or use the restarts ABORT
>   and MUFFLE-WARNING.

Is the restriction permanent or just temporary?

>
>        (use-package :c)
>        (let ((warnings nil))
>          (handler-bind ((compiler-message #'(lambda (c)
>                                               (push c warnings))))
>            (compile-file "foo.lsp" :verbose nil :print nil))
>          (format t "~&;;; Printing compiler messages")
>          (loop for m in (nreverse warnings)
>             for i from 0
>             do (format t "~&~@<;;; ~@;Message #~D~%~A~:>" i m)))
>
> Juanjo

Looks good.  Many thanks!

-- Gaby




More information about the ecl-devel mailing list