This program
    define(`A', x define('A',y)A z)
    A
produces this answer

    y

It appears that the inner definition stamps on the
outer definition in progress. I imagine that each
allocates and fills a string that it assigns as the
stored definition for A, The inner one, being
assigned later, wins. The outer one likely
becomes either a memory leak or a use of
freed storage.

I claim the output should be
    x y z

I also claim this is not a pathological example
that should be declared illegal. I ran into it in a
subtle guise that was completely reasonable.

If my guess about the nature of the collision is
correct, the fix would be to make the assignments
referred to above at the end of the definition
process, not the beginning.

Doug

Reply via email to