This is the mail archive of the gcc@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: Should GCC publish a general rule/warning due to it's default presumption of undefined signed integer overflow semantics?


Andrew Pinski <pinskia@physics.uc.edu> writes:

| On Jul 1, 2005, at 12:06 AM, Gabriel Dos Reis wrote:
| >
| > There are of course coner and pathological cases, but I don't think we
| > should worry too much about missing them.  Let's first cover the
| > structured loops, and address the contorsed ones later if they become
| > really important.
| 
| And I just submitted a patch for one of those corner/pathological cases
| and it actually does improve code, how much I don't know because I don't
| have access to any benchmark to test on.  If someone wants to test it,
| they will most likely find it, it does in fact improve code.
| 
| Also knowing in let say fold if the variable is a loop index or not is
| actually not trivial.
| 
| Another testcase where we will fail out at if we take the view you want
| to take is:

As I said, if you let user tell you that his loop behaves well, i.e.
bounds do not rely on wrapping semantics, and yet he writes his loop to
deceive the compiler, then he loses.  Let him choose his own poinson,
don't think you have to choose it for him.

-- Gaby


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