This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Updating fixed-point support for new C constant expression handling
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 9 Aug 2009 17:45:33 +0000 (UTC)
- Subject: Re: Updating fixed-point support for new C constant expression handling
- References: <874otx376b.fsf@talisman.home> <Pine.LNX.4.64.0906301913150.25255@digraph.polyomino.org.uk> <87d475hstn.fsf@firetop.home>
On Sun, 9 Aug 2009, Richard Sandiford wrote:
> gcc/
> * c-common.c (c_fully_fold_internal): Issue a warning if a binary
> operation overflows. Likewise non-cast unary arithmetic.
> If one arm of a conditional expression is always taken,
> inhibit evaluation warnings for the other arm. Likewise inhibit
> evaluation warnings for the second && or || operand if the first
> operand is enough to determine the result.
> * c-typeck.c (build_conditional_expr): Apply the same inhibition
> rules here.
> (build_binary_op): Prevent duplicate evaluation warnings.
>
> gcc/testsuite/
> * gcc.dg/overflow-warn-8.c: New test.
OK.
--
Joseph S. Myers
joseph@codesourcery.com