|
From: | Davis Herring |
Subject: | Re: [Emacs-diffs] master b7fa6b1 1/4: Simplify use of FOR_EACH_TAIL |
Date: | Mon, 6 Feb 2017 10:38:13 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
FOR_EACH_TAIL (tail, list) if (EQ (XCAR (tail), elt)) return true; where the macro declares 'tail' to be local to the loop. Unfortunately there doesn't seem to be any way to that in portable C.
Could you explain that limitation? I thought you meant by "portable C" C89, but you of course used a C99 loop-scope declaration in the end. Did you just mean that you couldn't have that variable declared and also the tortoise integer declared because they were different types (and you didn't want to open a pair of braces in the macro that would have to be closed later)?
Mostly curious, Davis --This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.
[Prev in Thread] | Current Thread | [Next in Thread] |