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] PR34389 -Wconversion produces wrong warning


On Feb 16, 2008 6:31 PM, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> On 16/02/2008, Richard Guenther <richard.guenther@gmail.com> wrote:
> >
> > The correct fix is to not fold expressions in the C frontend before doing
> > these kinds of warnings.
> >
>
> The fold is done by the last call to "convert" in build_binary_op in
> c-typeck.c And this is not just the C front end but also C++.
>
> So I don't see how folding can be prevented here.

It was mainly a general remark that the frontends should not fold
expressions but
defer that to the middle-end (we for example can (and do) fold during
gimplification).

Richard.


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