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: [RFC] PR 51712 -Wtype-limits should not trigger for enum constants


PING: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00383.html

And on a general note, what is the opinion of the C/C++ maintainers
about tracking the original source code more faithfully than currently
done?

Cheers,

Manuel.


On 5 May 2012 11:06, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> This patch adds the ability to see in shorten_compare that a constant
> comes from an enumeral type. It does so by using in both C/C++ the
> existing infrastructure from the C FE (c_expr). Currently, only the C
> FE carries down the correct information to avoid warning, so C++ still
> warns. However, this patch also opens the possibility to pass down
> this info in the C++ FE using c_expr, and avoid warning in a follow up
> patch.
>
> Bootstrapped and regression tested. This is a proof-of-concept, so I
> don't provide a changelog or update the comments of new/existing
> functions.
>
> Comments? Is this approach OK?
>
> Cheers,
>
> Manuel.


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