This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC: recursion too deep
- To: zack at wolery dot cumb dot org (Zack Weinberg)
- Subject: Re: GCC: recursion too deep
- From: Joe Buck <jbuck at possibly dot synopsys dot com>
- Date: Thu, 20 Apr 2000 10:34:19 -0700 (PDT)
- Cc: e9926212 at student dot tuwien dot ac dot at (Christian Schoebel), gcc at gcc dot gnu dot org
Christian Schoebel wrote:
> > Can you help me with this problem?
> >
> > Command: gcc -traditional ipxrcv.c
> >
> > In file included from /usr/include/netinet/in.h:27,
> > from ipxrcv.c:4:
> > /usr/include/bits/socket.h:289: macro or `#include' recursion too deep
> > /usr/include/bits/socket.h:290: macro or `#include' recursion too deep
> > /usr/include/bits/socket.h:291: macro or `#include' recursion too deep
> > ipxrcv.c:17: macro or `#include' recursion too deep
Zack writes:
> Don't use -traditional.
I'll be kind and give a you a more complete answer. In the old K&R
preprocessor, if the name of a macro appears in the expansion of a macro,
you have an infinite recursion. But in an ISO/ANSI standard preprocessor,
there is no recursion: the name is not expanded.
That is, if I write
---------------
#define foo foo+1
int q=foo;
---------------
with a conforming preprocessor I get
int q=foo+1;
but with a K&R (-traditional) preprocessor there is an infinite recursion
so the "macro or `#include' recursion too deep" appears. Evidently the
header <bits/socket.h> uses this style.