This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -Wvariadic-macros does not print warning
- From: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- To: manu at gcc dot gnu dot org, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Apr 2014 23:30:18 +0530
- Subject: Re: -Wvariadic-macros does not print warning
- Authentication-results: sourceware.org; auth=none
- References: <CAJXstsDGN7XDYBjFvgCsV-nAceMZNMB+2snrEcfH0jcNNLev5g at mail dot gmail dot com>
forgot to add gcc-patches@gcc.gnu.org. Sorry for the double-post.
On Wed, Apr 23, 2014 at 11:28 PM, Prathamesh Kulkarni
<bilbotheelffriend@gmail.com> wrote:
> This is a follow up mail to http://gcc.gnu.org/ml/gcc-help/2014-04/msg00096.html
> I have attached patch that prints the warning when passed -Wvariadic-macros
> (I mostly followed it along lines of -Wlong-long).
> OK for trunk ?
>
> [libcpp]
> * macro.c (parse_params): Remove condition CPP_OPTION (pfile, cpp_pedantic).
>
> [gcc/c-family]
> * c.opt (-Wvariadic-macros): Init(-1) instead of Init(1).
> * c-opts.c (c_common_handle_option): Add case OPT_Wvariadic_macros.
> (sanitize_cpp_opts): Check condition for pedantic or
> warn_traditional.
>
> Thanks and Regards,
> Prathamesh