Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

Commit b434f83

Browse files
committed
check for known declaration identifiers
This causes SBCL to emit fewer spurious compile-time warnings
1 parent 3aac7bf commit b434f83

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

utilities.lisp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,17 @@ type specifier is not checked for validity: it's just assumed to be valid."
112112
(etypecase specifier/type
113113
(symbol
114114
(values
115-
(if (valid-type-specifier-p specifier/type environment)
115+
(case specifier/type
116+
;; Catching these explicitly reduces the chance of a
117+
;; calls to VALID-TYPE-SPECIFIER-P which means SBCL
118+
;; generates fewer spurous compile-time warnings.
119+
((declaration dynamic-extent ftype function ignore ignorable
120+
inline notinline optimize special type)
121+
declaration)
122+
(otherwise
123+
(if (valid-type-specifier-p specifier/type environment)
116124
`(type ,specifier/type ,@rest)
117-
declaration)
125+
declaration)))
118126
t))
119127
(cons
120128
(values `(type ,specifier/type ,@rest) nil)))))))

0 commit comments

Comments
 (0)