This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Emit accurate debug info for short-circuit operators
> These changes are OK.
Thanks.
> > * c-typeck.c (build_unary_op) <TRUTH_NOT_EXPR>: Reset the location if
> > TRUTH_NOT_EXPR has been folded.
>
> Could you explain why this is needed in more detail? Why isn't the
> location passed in to build_unary_op always appropriate for the final
> location setting?
This location is that of the '!'; when it is folded, for example
!(a || b) => !a && !b
you don't want to put this location on the '&&' but preserve that of the '||'.
--
Eric Botcazou