[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inlinable functions instead of macros
From: |
Stefan Monnier |
Subject: |
Re: inlinable functions instead of macros |
Date: |
Fri, 24 Aug 2012 22:05:16 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
> 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
- Re: C backtraces for Emacs, (continued)
- Re: C backtraces for Emacs, Eli Zaretskii, 2012/08/25
- Re: inlinable functions instead of macros, Paul Eggert, 2012/08/22
- Re: inlinable functions instead of macros, Andreas Schwab, 2012/08/22
- Re: inlinable functions instead of macros, Stefan Monnier, 2012/08/22
- Re: inlinable functions instead of macros, Paul Eggert, 2012/08/24
- Re: inlinable functions instead of macros, Tom Tromey, 2012/08/24
- Re: inlinable functions instead of macros, Paul Eggert, 2012/08/24
- Re: inlinable functions instead of macros, Eli Zaretskii, 2012/08/25
- Re: inlinable functions instead of macros, Tom Tromey, 2012/08/25
- Re: inlinable functions instead of macros, Paul Eggert, 2012/08/26
- Re: inlinable functions instead of macros,
Stefan Monnier <=
- Re: inlinable functions instead of macros, Paul Eggert, 2012/08/26
- Re: inlinable functions instead of macros, Eli Zaretskii, 2012/08/22
Re: inlinable functions instead of macros, Richard Stallman, 2012/08/18
Re: inlinable functions instead of macros, Óscar Fuentes, 2012/08/18
Re: inlinable functions instead of macros, Florian Weimer, 2012/08/19
Re: inlinable functions instead of macros, Sam Steingold, 2012/08/20