unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: 16520@debbugs.gnu.org
Subject: bug#16520: 24.3.50; cl-defstruct with :predicate option
Date: Wed, 22 Jan 2014 11:06:34 +0100	[thread overview]
Message-ID: <m2zjmoqqj9.fsf@gmail.com> (raw)

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






             reply	other threads:[~2014-01-22 10:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 10:06 Helmut Eller [this message]
2014-01-22 13:47 ` bug#16520: 24.3.50; cl-defstruct with :predicate option 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2zjmoqqj9.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=16520@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).