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: auto generate cpp_reason to gcc OPT_W table


On Fri, 5 Sep 2014, Manuel López-Ibáñez wrote:

> This adds a new option property CppReason which maps to a warning
> reason code in cpplib.h. This allows us to auto-generate
> cpp_reason_option_codes[], which maps from CPP warning codes to GCC
> ones, thus making a bit harder to forget to update this table (which
> evidently has happened a lot in the past).
> 
> Unfortunately, to use cpp warning codes we need to include cpplib.h in
> options.h and this would conflict with other parts of the compiler,
> thus I protect the table with #ifdef GCC_C_COMMON_H, and make sure in
> c-common.c that cpplib.h is not included before c-common.h.
> 
> This patch applies on top of the previous patch about Wnormalized= but
> it is mostly independent of it.
> 
> Bootstrapped and regression tested on x86_64-linux-gnu
> 
> OK?

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

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