From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: inlinable functions instead of macros
Date: Fri, 24 Aug 2012 22:05:16 -0400 [thread overview]
Message-ID: <jwvd32frat1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <5037F411.4010905@cs.ucla.edu> (Paul Eggert's message of "Fri, 24 Aug 2012 14:37:21 -0700")
> problems that make the macros hard to use. They cannot be invoked
> from GDB, which complicates debugging. More important, callers
Most of those macros don't need to be used from GDB (e.g. I've never
needed to use ASET from GDB).
> restriction makes callers error-prone. We've tried to address some of
> the side-effect issues with this hack:
> /* The IDX==IDX tries to detect when the macro argument is side-effecting. */
> #define ASET(ARRAY, IDX, VAL) \
> (eassert ((IDX) == (IDX)), \
This should be removed indeed. I added it temporarily and in any case
it doesn't work (e.g. "i++ == i++" will always return true in my
experience).
> + Reimplement in terms of eassert_f, blv_found_f, set_blv_found_f.
> + (eassert_f, blv_found_f, set_blv_found_f): New macros or functions,
> + containing the guts of the old, but which let the caller specify
> + file and line number.
I'd rather avoid these kinds of efforts,
Stefan
next prev parent reply other threads:[~2012-08-25 2:05 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 23:48 inlinable functions instead of macros Stefan Monnier
2012-08-17 23:59 ` Paul Eggert
2012-08-18 22:15 ` Daniel Colascione
2012-08-18 22:55 ` John Yates
2012-08-19 4:22 ` Richard Stallman
2012-08-21 17:50 ` Stefan Monnier
2012-08-22 9:24 ` C backtraces for Emacs Paul Eggert
2012-08-22 16:01 ` Eli Zaretskii
2012-08-22 16:39 ` Paul Eggert
2012-08-23 0:40 ` Daniel Colascione
2012-08-23 16:55 ` Eli Zaretskii
2012-08-24 10:48 ` Paul Eggert
2012-08-25 4:41 ` Paul Eggert
2012-08-25 5:57 ` Eli Zaretskii
2012-08-22 9:28 ` inlinable functions instead of macros Paul Eggert
2012-08-22 9:48 ` Andreas Schwab
2012-08-22 14:31 ` Stefan Monnier
2012-08-24 21:37 ` Paul Eggert
2012-08-25 1:38 ` Tom Tromey
2012-08-25 2:58 ` Paul Eggert
2012-08-25 5:35 ` Eli Zaretskii
2012-08-25 20:13 ` Tom Tromey
2012-08-26 4:42 ` Paul Eggert
2012-08-25 2:05 ` Stefan Monnier [this message]
2012-08-26 5:31 ` Paul Eggert
2012-08-22 16:03 ` Eli Zaretskii
2012-08-18 19:08 ` Richard Stallman
2012-08-18 20:57 ` Paul Eggert
2012-08-18 21:03 ` Eli Zaretskii
2012-08-18 21:31 ` Paul Eggert
2012-08-19 2:45 ` Eli Zaretskii
2012-08-18 21:14 ` Óscar Fuentes
2012-08-19 17:28 ` Florian Weimer
2012-08-20 20:38 ` Sam Steingold
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=jwvd32frat1.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@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).