Macro Substitution Problem

I just wanted to share a problem on macro substitution.

Following link gives a clear information on the problem as well as the
My issue was with the use of token pasting operator.
I had a similar problem where in, instead of the ‘value’ the ‘macro’ itself
was getting placed.

Actually it should have been expanded as – (*((&TMR2)) = 0x12345678)

[VREG implemented as TMR##i]
But it is getting expanded as – (*((&TMRTMR_ID_2)) = 0x12345678)

It was possible to get rid of this problem by incorporating one more level of


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s