>     Actually, it often happens that things like ENABLE_CHECKING add assert
>     statements in the macro expansion which causes the args to be used more
>     than once.

> As far as I can see, ENABLE_CHECKING has no such effect anywhere.

It does.
See the definition of XSET:

#define XSET(var, type, ptr)                                    \
    (eassert (XTYPE (ptr) == 0), /* Check alignment.  */        \
     (var) = ((EMACS_INT) (type)) | ((EMACS_INT) (ptr)))

> And there is only one definition of SREF.

Yes, currently SREF does not currently "suffer" from this problem, but it
may become useful at some point in the future to add some kind of check on
the second or of SREF.

I have myself bumped into such problem when I try to add such checks in XINT
(which currently doesn't check that its arg is indeed an integer).


        Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to