all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16520: 24.3.50; cl-defstruct with :predicate option
@ 2014-01-22 10:06 Helmut Eller
  2014-01-22 13:47 ` Stefan Monnier
  2014-01-23 15:02 ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Helmut Eller @ 2014-01-22 10:06 UTC (permalink / raw)
  To: 16520

Compiling this code:

  (require 'cl-lib)
  (cl-defstruct (foo (:predicate foop)))
  (defun bar (x) (cl-check-type x foo))

with with:  emacs -Q -batch -f batch-byte-compile foo.el
produces this warning:

  foo.el:8:1:Warning: the function `foo-p' is not known to be defined.

and since foo-p is not defined will also lead errors at run-time when
bar is called.

Adding eval-and-compile to the structure definition avoids the problem
but it's a bug that the compiler emits a call to foo-p at all.


In GNU Emacs 24.3.50.2 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2014-01-20 on ix






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-01-30 22:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 10:06 bug#16520: 24.3.50; cl-defstruct with :predicate option Helmut Eller
2014-01-22 13:47 ` Stefan Monnier
2014-01-23 15:02 ` Stefan Monnier
2014-01-29 10:00   ` Helmut Eller
2014-01-29 13:59     ` Stefan Monnier
2014-01-29 17:47       ` Helmut Eller
2014-01-30  3:58         ` Stefan Monnier
2014-01-30 12:07           ` Helmut Eller
2014-01-30 14:43             ` Stefan Monnier
2014-01-30 22:33               ` Helmut Eller

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.