Andreas Schwab <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] (Kim F. Storm) writes:
>
>> David Kastrup <[EMAIL PROTECTED]> writes:
>>
>>> For debugging purposes, I have been using the following:
>>>
>>> struct trbuf { void* pc; int value; } trbuf[256];
>>> unsigned char trptr;
>>> #define RECORD_INPUT do { __label__ woozle; \
>>>   woozle: trbuf[trptr++] = (struct trbuf)                           \
>>
>> Does [trptr++%256] give better results ?
>
> trptr is unsigned char, so won't ever be bigger than 255.

Type promotion can lead to strange effects.  While trptr++ seems like
a safe bet, I would not trust ++trptr...

Anyway, this apparently is a compiler or a dumper problem with the
local label.  I have to get at the current address with a different
method, probably inline assembly.  Pity.

Or construct a non-local label name from __LINE__.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


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

Reply via email to