Spurious Style Warning for CL-like functions

Bug #1706769 reported by Pascal J. Bourguignon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Opinion
Wishlist
Unassigned

Bug Description

I get style-warnings such as:

; caught STYLE-WARNING:
; &OPTIONAL and &KEY found in the same lambda list: (STRING &OPTIONAL (EOF-ERROR-P T) (EOF-VALUE NIL) &KEY (START 0) (END NIL) (PRESERVE-WHITESPACE NIL))
WARNING: Lisp compilation had style-warnings while compiling #<CL-SOURCE-FILE "com.informatimago.common-lisp.lisp-reader" "reader">

for functions that have the same symbol-name and the same signature as functions in CL with both &optional and &key parameters.

Those style warnings should be disabled by default.

(I would say, that on the contrary, if you find a function named READ-FROM-STRING and it doesn't have the same &optional and &key parameters as CL:READ-FROM-STRING, it might be a good idea to signal a style-warning about this!).

Revision history for this message
Douglas Katzman (dougk) wrote :

This warning has nothing to do with "CL-like" functions.
It's produced whenever the compiler sees &OPTIONAL and &KEY in the same lambda list.

As it happens, read-from-string uses that error-phone convention, which is neither here nor there.

So:
1. it's not a spurious warning,
2. it's not going to be disabled by default; you could propose that on the mailing list
3. it would be a bad idea to issue more warnings just because some user-defined function had a symbol-name resembling another in a different package, standard or otherwise.

Changed in sbcl:
status: New → Opinion
importance: Undecided → Low
importance: Low → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.