GCC: recursion too deep
Joe Buck
jbuck@possibly.synopsys.com
Thu Apr 20 10:41:00 GMT 2000
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.
More information about the Gcc
mailing list