[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strangeness in ASRT

From: Richard Stallman
Subject: Strangeness in ASRT
Date: Sun, 10 Feb 2008 13:42:16 -0500

This seems to have a bug which breaks compilation.

    /* The IDX==IDX tries to detect when the macro argument is side-effecting.  
    #define ASET(ARRAY, IDX, VAL)       \
      (eassert ((IDX) == (IDX)),                                \
       eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)),   \
       ASLOT ((ARRAY), (IDX)) = (VAL))

Changing ASLOT to AREF makes it compile.  (Bootstrapping still crashes
as before.)

What is the purpose of these tests?  The expansion of AREF
substitutes IDX only once, so there is no problem if it has
a side effect.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]