This is the mail archive of the gcc-bugs@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: [RFA] Integrated cpp -include -g fix


On Wed, Nov 15, 2000 at 11:06:24PM +0000, Neil Booth wrote:
> This is a fix + testcase to the integrated frontend segfault on -g
> -include, along the lines Zack suggested.  Like he said it's not
> ideal, but avoids touching all front ends, at least until after 3.0.

I might have a way to avoid touching any language-independent files.
In c-parse.in and cp/parse.y, change "%start program" to "%start
goal", and add a rule like this:

goal:
	{ init_parse_delayed (); }
	program
	{}
	;

where init_parse_delayed is as you defined it in your patch.  It ought
to be possible to collapse together the 'goal', 'program', and
possibly 'extdefs' rules, but I'm not good enough at Yacc grammar
hacking to do that.

This idea is cribbed from the Java parser, incidentally, and I'm not
sure it will work - depends on whether or not the parser calls the
lexer before it runs that first action.

zw

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