This is the mail archive of the egcs-patches@egcs.cygnus.com mailing list for the EGCS project.


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

Re: cpplib startup patch


I thought I had responded to this with some suggestions, but I guess I
didn't.......

Jason Merrill wrote:

> The case we're talking about is when the file is of type .ii and we're
> generating assembly.

Then this has nothing to do with output_line_command. All it does is generate a
#line directive in the preprocessed output. It doesn't make any decisions
regarding the name of the program. In fact it has no effect at all unless
preprocessed output is being generated.

The problem must be that the initial #line directive is not being processed
soon enough. If so, then I suggest that:

o your new code be put into it's own function (i.e. not in output_line_command)
and called from cpp_start_read
o your new code be enhanced to recognize a #line directive that starts with
whitespace.
o lang_init uses the proper cpplib API (I think you've already discovered the
correct way) to set input_filename instead of calling check_newline.

I know some of this is cosmetic, but I think that doing this as a wrapper
around output_line_command is misleading.

Dave


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