This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: error "macro or #include recusion too deep" ... ad infinitium
- To: Graham Stott <grahams at redhat dot com>
- Subject: Re: error "macro or #include recusion too deep" ... ad infinitium
- From: Neil Booth <neilb at earthling dot net>
- Date: Mon, 13 Nov 2000 22:33:38 +0000
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <20001025231849.A20348@daikokuya.demon.co.uk> <20001026165546.D24137@wolery.stanford.edu> <20001026202325.H24137@wolery.stanford.edu> <20001027194118.B13589@daikokuya.demon.co.uk> <20001030203249.R8628@wolery.stanford.edu> <20001113203603.B30608@daikokuya.demon.co.uk> <3A106D7D.2458259C@redhat.com>
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.