Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cmucl
cmucl
Commits
0eaf3074
Commit
0eaf3074
authored
Jul 25, 1993
by
ram
Browse files
Bind compiler-warning-handler around compiler-warning calls in PRINT-SUMMARY so
that source context will be printed for undefined warnings.
parent
9624bd9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/main.lisp
View file @
0eaf3074
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/main.lisp,v 1.
8
9 1993/07/2
2 11:17:54 wlott
Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/main.lisp,v 1.9
0
1993/07/2
5 21:25:43 ram
Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -505,36 +505,37 @@
;;;
(
defun
print-summary
(
abort-p
abort-count
)
(
unless
abort-p
(
let
((
undefs
(
sort
*undefined-warnings*
#'
string<
:key
#'
(
lambda
(
x
)
(
let
((
x
(
undefined-warning-name
x
)))
(
if
(
symbolp
x
)
(
symbol-name
x
)
(
prin1-to-string
x
)))))))
(
unless
*converting-for-interpreter*
(
dolist
(
undef
undefs
)
(
let
((
name
(
undefined-warning-name
undef
))
(
kind
(
undefined-warning-kind
undef
))
(
warnings
(
undefined-warning-warnings
undef
))
(
count
(
undefined-warning-count
undef
)))
(
dolist
(
*compiler-error-context*
warnings
)
(
compiler-warning
"Undefined ~(~A~): ~S"
kind
name
))
(
let
((
warn-count
(
length
warnings
)))
(
when
(
and
warnings
(
>
count
warn-count
))
(
let
((
more
(
-
count
warn-count
)))
(
compiler-warning
"~D more use~:P of undefined ~(~A~) ~S."
more
kind
name
)))))))
(
dolist
(
kind
'
(
:variable
:function
:type
))
(
let
((
summary
(
mapcar
#'
undefined-warning-name
(
remove
kind
undefs
:test-not
#'
eq
:key
#'
undefined-warning-kind
))))
(
when
summary
(
compiler-warning
"~:[This ~(~A~) is~;These ~(~A~)s are~] undefined:~
~% ~{~<~% ~1:;~S~>~^ ~}"
(
cdr
summary
)
kind
summary
))))))
(
handler-bind
((
warning
#'
compiler-warning-handler
))
(
let
((
undefs
(
sort
*undefined-warnings*
#'
string<
:key
#'
(
lambda
(
x
)
(
let
((
x
(
undefined-warning-name
x
)))
(
if
(
symbolp
x
)
(
symbol-name
x
)
(
prin1-to-string
x
)))))))
(
unless
*converting-for-interpreter*
(
dolist
(
undef
undefs
)
(
let
((
name
(
undefined-warning-name
undef
))
(
kind
(
undefined-warning-kind
undef
))
(
warnings
(
undefined-warning-warnings
undef
))
(
count
(
undefined-warning-count
undef
)))
(
dolist
(
*compiler-error-context*
warnings
)
(
compiler-warning
"Undefined ~(~A~): ~S"
kind
name
))
(
let
((
warn-count
(
length
warnings
)))
(
when
(
and
warnings
(
>
count
warn-count
))
(
let
((
more
(
-
count
warn-count
)))
(
compiler-warning
"~D more use~:P of undefined ~(~A~) ~S."
more
kind
name
)))))))
(
dolist
(
kind
'
(
:variable
:function
:type
))
(
let
((
summary
(
mapcar
#'
undefined-warning-name
(
remove
kind
undefs
:test-not
#'
eq
:key
#'
undefined-warning-kind
))))
(
when
summary
(
compiler-warning
"~:[This ~(~A~) is~;These ~(~A~)s are~] undefined:~
~% ~{~<~% ~1:;~S~>~^ ~}"
(
cdr
summary
)
kind
summary
)))))))
(
unless
(
or
*converting-for-interpreter*
(
and
(
not
abort-p
)
(
zerop
abort-count
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment