On 12 September 2017 at 17:08, Prathamesh Kulkarni
<prathamesh.kulka...@linaro.org> wrote:
> Hi,
> I am working on patch for PR78736
> (https://gcc.gnu.org/ml/gcc-patches/2017-09/msg00011.html),
> which adds a new warning -Wenum-conversion to C front-end to warn for
> implicit conversion between different enums.
> The warning in that patch triggered on io/transfer.c for following
> implicit conversions:
> i) Implicit conversion from unit_mode to file_mode
> ii) Implicit conversion from unit_sign_s to unit_sign.
>
> I was wondering if the warning for above implicit conversions would be
> correct since unit_mode
> and file_mode are different enums and similarly unit_sign_s and
> unit_sign are different enums ?
> Or are these warnings false positives ?
>
> The attached patch makes the conversion explicit to silence the warnings.
> Bootstrap+tested on x86_64-unknown-linux-gnu.
> Does the patch look OK ?
ping https://gcc.gnu.org/ml/fortran/2017-09/msg00036.html

Thanks,
Prathamesh
>
> Thanks,
> Prathamesh

Reply via email to