error "macro or #include recusion too deep" ... ad infinitium

Neil Booth neilb@earthling.net
Mon Nov 13 14:33:00 GMT 2000


Thanks for the bug report.

Graham Stott wrote:-

> Preprocessing the following with recent CVS
> 
> ---------------------------------------
> #define REG(a)          a
> #define r0              REG(r0)
> 
> r0
> ----------------------------------------

I was just about to curse (I would swear by the current macro
expander; finding a bug in it would really depress me).  Then I
read...

> using --traditional option results in

Ah, phew <g>.  I don't know the rules of traditional expansion well,
though my undersanding is that infinite recursion is easily done.

> test.c:6: macro or #include recursion too deep
> test.c:6: macro or #include recursion too deep
> test.c:6: macro or #include recursion too deep
> ....
> ad infinitum

Just to be clear, are you saying we should exit and not infinite loop?
If so, I agree.  I'll have a look when I get a chance.

Neil.


More information about the Gcc-bugs mailing list