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: Fix PR 33738


"Diego Novillo" <dnovillo@google.com> writes:

> +  if (warn_type_limits
> +      && ret
> +      && TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison)

...

> +	  warning (OPT_Wextra, "%H%s", &locus, warnmsg);

If you're testing warn_type_limits above, then shouldn't you use
OPT_Wtype_limits below?  Only that seems strange, because
-Wtype-limits is C/C++ specific.  We shouldn't introduce a new -Wextra
warning, because we are trying to name all those warnings.

Perhaps the best solution is to move Wtype-limits from c.opt to
common.opt, and move the handling of it from c-opts.c to opts.c.  The
documentation does not say that it is C/C++ only, so this seems OK to
me.

Ian


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