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: [RFC] PR 53063 encode group options in .opt files


On 10 May 2012 16:05, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Wed, 9 May 2012, Manuel López-Ibáñez wrote:
>
>> 2012-05-09 ?Manuel López-Ibáñez ?<manu@gcc.gnu.org>
>>
>> ? ? ? PR 53063
>> gcc/
>> ? ? ? * doc/options.texi (EnabledBy): Document
>> ? ? ? * opts.c: Include opts.h and options.h before tm.h.
>> ? ? ? (finish_options): Do not handle some sub-options here...
>> ? ? ? (common_handle_option): ... instead call common_handle_option_auto here.
>> ? ? ? * optc-gen.awk: Handle EnabledBy.
>> ? ? ? * opth-gen.awk: Declare common_handle_option_auto.
>> ? ? ? * common.opt (Wuninitialized): Use EnabledBy. Delete Init.
>> ? ? ? (Wmaybe-uninitialized): Likewise.
>> ? ? ? ? (Wunused-but-set-variable): Likewise.
>> ? ? ? ? (Wunused-function): Likewise.
>> ? ? ? ? (Wunused-label): Likewise.
>> ? ? ? ? (Wunused-value): Likewise.
>> ? ? ? ? (Wunused-variable): Likewise.
>> ? ? ? ? * opt-read.awk: Create opt_numbers array.
>> ada/
>> ? ? ? * gcc-interface/misc.c (gnat_parse_file): Move before ...
>> ? ? ? (gnat_handle_option): ... this. Use handle_generated_option.
>> c-family/
>> ? ? ? * c-opts.c (c_common_handle_option): Use handle_generated_option
>> ? ? ? to enable sub-options.
>> fortran/
>> ? ? ? * options.c: Include diagnostics.h instead of
>> ? ? ? diagnostics-core.h.
>> ? ? ? (set_Wall): Do not see warn_unused here.
>> ? ? ? (gfc_handle_option): Set it here using handle_generated_option.
>
> OK with the
>
>> \ No newline at end of file
>
> fixed (i.e. a newline added to the end of optc-gen.awk) and 2012 added to
> copyright dates of modified files if not already there.

Great! Now we have EnabledBy for common options. Now, what should we
do with language specific settings? One idea could be to have
something like:

LangEnabledBy(Fortran Ada, Wall)

and then auto-generate something like:

ada_handle_option_auto();
fortran_handle_option_auto()

which would be called by the *_handle_option() of each front-end.

Does this sound reasonable?

Cheers,

Manuel.


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