Need clearer error for malformed (declare (ignore))

Bug #1000239 reported by naryl on 2012-05-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

version: SBCL 1.0.55

uname: Linux naryl-workstation 3.2.7-pf #6 SMP PREEMPT Wed May 2 16:06:23 MSK 2012 x86_64 Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz GenuineIntel GNU/Linux


Trying to compile "(defun test (a) (declare (ignore (a))) nil)" results in the following error message:

#<THREAD "initial thread" RUNNING {1002998E83}>:
  error while parsing arguments to DESTRUCTURING-BIND:
    invalid number of elements in
    to satisfy lambda list
      (SB-C::WOT SB-C::FN-NAME):
    exactly 2 expected, but 1 found

With backtrace deep inside IR1. In case the user just wrote an extra pair of parentheses around the var the message is a bit misleading.

Stas Boukarev (stassats) wrote :

commit 01cc9978e742a5e3a7882e397b01857bed774501
Author: Stas Boukarev <email address hidden>
Date: Wed May 16 19:04:21 2012 +0400

    Better error message for malformed IGNORE declarations.

    Give better errors for things like (ignore (a)) and
    (ignore (function . b)).

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats) on 2012-05-21
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers