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 11 May 2012 21:23, Joseph S. Myers <joseph@codesourcery.com> wrote:
>
> There's nothing wrong with having separate autogenerated functions for
> each language if you want to split things out that way, but it would seem
> simpler just to have one function called somewhere central, whatever
> option it is (common or not) that is enabling other options.

The problem with this approach is that it is not clear how to decide
in this single function that -Wextra needs to enable a C-only option
or not. The function would need to know that it is called from the
C-FE somehow.  Having a separate function for each language easily
overcomes this issue.

This is my current draft patch. It bootstraps and passes regression
tests. It seems flexible enough to implement almost all of Wall and
Wextra. Missing features are options that enabled by the combination
of two options (like Wunused-parameter) and options that are
conditional on something else (Wmain).

Is this approach ok with you? Should I clean it up and provide a changelog?

Cheers,

Manuel.



>
> --
> Joseph S. Myers
> joseph@codesourcery.com

Attachment: group-options-3.diff
Description: Binary data


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