improved behavior of macros that are function definitions.

Change-Id: Ie81c8c0aeee5f909aaadcebb57368efeea33efef
improved error messages

Change-Id: I83855b360d29da0e854b62a498cd5e5b7898f619