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

Re: [incremental] Patch: FYI: save and restore options and params


2008/7/29 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> On 25/03/2008, Tom Tromey <tromey@redhat.com> wrote:
>> >>>>> "Manuel" == Manuel López-Ibáñez <lopezibanez@gmail.com> writes:
>>
>>  Manuel> When you say "save the default settings", what do you mean
>>  Manuel> exactly?  The settings given when invoking the server or the
>>  Manuel> default settings as given in the *.opt files?
>>
>>  They are the same thing.  Right now I think you can pass more
>>  arguments to "gcc --server", but they are ignored.
>>
>>  This code just walks over the variables in the option structure and
>>  makes a copy of their values.  Then later we restore by copying the
>>  values back.  This isn't completely satisfying since some options are
>>  handled in funny ways; I probably missed an odd case or two.
>>
>
> Well, I think part of this code should go to mainline but not in this form.
>
> First, I don't think there is a real reason for any option to not be
> handled through entries in the *.opt files. It looks like an
> unfinished transition.
>
> Second, the default value given in the *.opt files through Init()
> should be stored in your structure default_values. Then, options
> variables are initialized to some special value UNINITIALIZED.
> Currently we use -1 for this purpose for some of the options. When the
> compiler starts, it reads commandline options, sets variables and then
> for those still uninitialized, sets default values. The incremental
> compiler just needs 1 extra function (reset_options) that sets all
> options to their uninitialized state.
>

Sorry for the out-of-the-blue reply. The above was an email that I
wrote but never sent. Nonetheless, I think the comments are sitll
relevant.

Cheers,

Manuel.


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