This is the mail archive of the 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]
Other format: [Raw text]

Re: [3.4 patch?] -save-temps still produces different .s and .o

On Jan 23, 2004, Per Bothner <> wrote:

> Alexandre Oliva wrote:
>> Why?!  You see how simple it is to adjust the front ends, and the
>> control flow is almost exactly the same.

> The attached (incompletely tested, relative to previous patch)
> is simpler.

Yes, indeed, but frankly I don't find it to be more maintainable.
Burying the call to finish_options elsewhere feels wrong.  But I don't
care enough to push one way or another.

However, your simpler patch also fails to fix the problem that the
dir// entries are duplicated if you re-preprocess an already
preprocessed file.  Getting cb.dir_change to output while
preprocessing requires you to remove the token backtracking, such that
the line-change directive isn't processed twice, once issuing the
dir_change callback within read_main_directory (sp?), and once as a
regular line-change directive after backtracking.  This is wrong.

>> And how would this help?  It's opening the main input file and finding
>> out the main input file that has to be called before
>> lang_dependent_init(), and this doesn't happen in process_options().

> But it needs to, for the first (and usually only) main file.

Arguably, some of the callbacks might have to be called for every main
file, when you're compiling multiple files at once.

> I'll test the 3.4 branch with this patch.

IIRC the branch doesn't need the cast to non-const, only mainline
does.  And, personally, I find this cast ugly.  It's breaking the
rules, which is bad; I think it would be better change the rules, like
I did in my proposed patch.

Alexandre Oliva   Enjoy Guarana', see
Happy GNU Year!                     oliva@{,}
Red Hat GCC Developer                 aoliva@{,}
Free Software Evangelist                Professional serial bug killer

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