Standard Clarification
Doug Gwyn
gwyn at smoke.BRL.MIL
Sun Oct 22 09:47:52 AEST 1989
In article <23218 at cup.portal.com> Tim_CDC_Roberts at cup.portal.com writes:
> #define d define
> #d a include
>Does the standard require that this construct should compile correctly?
No, it requires that a diagnostic be issued.
>Isn't the preprocessor legally and morally bound to recursively
>substitute macros, at least until a cycle is found?
Yes; I suspect in the case you reported the compiler failed to look
beyond the replacement buffer for the () necessary for the getchar()
expansion to be triggered. That's a bug.
More information about the Comp.lang.c
mailing list