This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]