On 11/13/2013 03:48 PM, Paulo Matos wrote: > I cannot understand GCC's reasoning that the second loop is not > simple. The only source code difference is that unsigned int b is > extern. However, it will always be higher than 'a' (unsigned int) > and the loop can't possibly be infinite. > > Does anybody know why GCC is behaving this way?
Because GCC does not know that *c++ = 0; will not overwrite b . I suppose you could argue that it's not really infinite, because a will eventually equal 0xffffffff, but I think that's what is going on. Andrew.