This is the mail archive of the
mailing list for the GCC project.
Re: Fix PR 33738
"Diego Novillo" <email@example.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