unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: 14883@debbugs.gnu.org
Subject: bug#14883: warning about unused returned value from some ert shoulds
Date: Mon, 22 Jul 2013 11:34:49 -0400	[thread overview]
Message-ID: <jwvfvv6y5mh.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <hawqoqnttq.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 16 Jul 2013 16:17:05 -0400")

> This is the same issue as http://debbugs.gnu.org/10969, for what is now
> cl-pop.

There's no `cl-pop'.  Instead `pop' is now always like CL's `pop'.

> byte-optimize-form-code-walker has special handling for the standard
> `pop' macro so as not to warn about unused return values from (pop foo).
> It would be nice if there was a general way to get the same result for
> arbitrary macros (sort of the opposite of side-effect-free?), but I
> don't see how.

I think the way to do it is to introduce a new function (call it
`ignorable') which works like `identity' and then make pop use it around
the code that returns the value.

Then byte-optimize-form-code-walker can be modified to recognize this
function and just throw away the whole call when `for-effect' is nil.
We can then get rid of this ad-hoc handling of `pop'.


        Stefan





  reply	other threads:[~2013-07-22 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 20:17 bug#14883: warning about unused returned value from some ert shoulds Glenn Morris
2013-07-22 15:34 ` Stefan Monnier [this message]
2013-09-05  3:06 ` Stefan Monnier

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=jwvfvv6y5mh.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=14883@debbugs.gnu.org \
    --cc=rgm@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).