master: defstruct: disallow (:initial-offset nil)

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  b52e4b75c9adcd70339da32fe7fc1f7390d39141 (commit)
      from  f87df9b1ab4f2a9f1d51e072683a8e8348b955f8 (commit)

- Log -----------------------------------------------------------------
commit b52e4b75c9adcd70339da32fe7fc1f7390d39141
Author: Stas Boukarev <[email protected]>
Date:   Wed Apr 15 22:36:27 2026 +0300

    defstruct: disallow (:initial-offset nil)
---
 src/code/defstruct.lisp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp
index 69d499e7b..01a50f2e6 100644
--- a/src/code/defstruct.lisp
+++ b/src/code/defstruct.lisp
@@ -747,7 +747,7 @@ requires exactly~;accepts at most~] one argument" keyword syntax-group)
       (:named
        (error "The DEFSTRUCT option :NAMED takes no arguments."))
       (:initial-offset
-       (setf (dd-offset dd) arg)) ; FIXME: disallow (:INITIAL-OFFSET NIL)
+       (setf (dd-offset dd) (the index arg)))
       (:pure
        (setf (dd-flags dd) (logior (logandc2 (dd-flags dd) +dd-pure+)
                                    (if arg +dd-pure+ 0))))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.