This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: basic VRP min/max range overflow question
- From: Sebastian Pop <sebastian dot pop at cri dot ensmp dot fr>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: DJ Delorie <dj at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Jul 2005 09:05:16 +0200
- Subject: Re: basic VRP min/max range overflow question
- References: <Pine.LNX.4.61.0506181606220.24758@digraph.polyomino.org.uk> <42B48D43.2070100@adacore.com> <9Z96FTq1w-B@khms.westfalen.de> <42B54D96.2050006@adacore.com> <20050620132549.GA6005@napoca.cri.ensmp.fr> <200506201809.j5KI9Vnp005082@greed.delorie.com> <20050713080136.GB5882@napoca.cri.ensmp.fr> <200507131517.j6DFHTeU028573@greed.delorie.com> <20050718162241.GB22195@napoca.cri.ensmp.fr> <m3wtnox9eu.fsf@uniton.integrable-solutions.net>
Gabriel Dos Reis wrote:
> Sebastian Pop <sebastian.pop@cri.ensmp.fr> writes:
>
> [...]
>
> | +@item -Wloop-bound-estimated
> | +@opindex Wloop-bound-estimated
> | +Warn when an estimation of the number of iterations is computed based
> | +on the fact that compiled programs are correct and do not invoke
> | +undefined behavior.
>
> I think the documentation would need to be less vague about the
> precondition -- there are many sources of "undefined behaviour" :-)
>
Well, then there are many sources from which to extract useful
informations as estimations of the loop bounds ;-)
Probably we need a different warning flag for each of these places
that extract information from undefined behaviour, then in the end a
single flag to trigger all of these.
I propose to change the warning flag to:
-Wloop-bound-estimated-by-accessed-data-size
then to have another warning for:
-Wloop-bound-estimated-by-signed-iv-ranges
In the end, having all of these flags triggered by
-Wloop-bound-estimated.
What about the following documentation for
-Wloop-bound-estimated-by-accessed-data-size
Warn when an estimation of the number of iterations is computed based
on the access functions used in a loop to access an array of known
size.