This is the mail archive of the gcc@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: GCC: recursion too deep


 
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.





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