This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Add -Wint-conversion option
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 30 Jun 2014 20:16:01 +0000
- Subject: Re: [C PATCH] Add -Wint-conversion option
- Authentication-results: sourceware.org; auth=none
- References: <20140630183149 dot GE20427 at redhat dot com>
On Mon, 30 Jun 2014, Marek Polacek wrote:
> Basically everything I wrote in the patch for -Wincompatible-pointer-types
> applies here as well. A new option, -Wint-conversion (to be compatible
> with clang), is added to allow more fine-grained control over the warnings.
> I think we should print the types here as well, and moreover, we could hint the
> user that & or * may be used to fix the code.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK with the documentation amended to make clear this is about *implicit*
conversions, not the cases covered by -Wno-int-to-pointer-cast and
-Wno-pointer-to-int-cast.
--
Joseph S. Myers
joseph@codesourcery.com