------- Comment #4 from joseph at codesourcery dot com 2007-05-04 12:00 ------- Subject: Re: gcc segfaults on very long pointer chains
On Fri, 4 May 2007, bangerth at dealii dot org wrote: > But seriously, while I do think that we should strive to compile even > programs that are "weird" or "unusual" in their requirements on the > compiler, I think that this one goes a little overboard. I would, > however, be interested to hear how many levels of pointers gcc > actually *can* compile. I would imagine it's at least a few > hundred, maybe thousand. Maybe you could try to figure out? That would depend on your stack limit (so the question would really be, for each extra MB of stack limit how many more levels can it compile)? For such extreme programs I think it's reasonable to expect users to increase their stack limit when running the compiler. Although in this case, it would be reasonably straightforward to make c_parser_declarator iterative (with an internal linked list on the parser obstack) rather than recursive - if that were actually of use in compiling real code with real stack limits. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31804