[PATCH] Avoid segfaulting in {start,finish}_decl

Jakub Jelinek jakub@redhat.com
Fri Oct 20 23:32:00 GMT 2000


On Fri, Oct 20, 2000 at 04:30:22PM -0700, Richard Henderson wrote:
> On Fri, Oct 20, 2000 at 11:46:09PM +0200, Jakub Jelinek wrote:
> > 	* c-decl.c (start_decl): Don't segfault if TREE_TYPE is error_mark.
> > 	(finish_decl): Likewise.
> 
> Jim beat you to fixing this:

I've updated on 18th :((.
Anyway, there is one difference between Jim's and my patch:

egcs 1.1.2 and 2.95.2 print (and with my patch as well):
e.i: In function `die':
e.i:3: `BAR' undeclared (first use in this function)
e.i:3: (Each undeclared identifier is reported only once
e.i:3: for each function it appears in.)
e.i:3: variable `foo' has initializer but incomplete type

while with Jim's patch it does not print the last error.
So the question is whether we want to put that error (to stay consistent
with previous releases) or not.

	Jakub


More information about the Gcc-patches mailing list