1 |
On Fri, 01 Jul 2011 02:44:36 +0300 |
2 |
Nikos Chantziaras <realnc@×××××.de> wrote: |
3 |
|
4 |
> > |
5 |
> > Your code is buggy, because you're breaking C's aliasing rules. You are |
6 |
> > not allowed to use a different pointer type to dereference a variable of |
7 |
> > a different type. Doing so results in undefined behavior. |
8 |
> |
9 |
|
10 |
Well, the error occurs only within the loop structure. If |
11 |
I manually "unroll" the loop using the same pointers there |
12 |
is no error when compiled with "O2." |
13 |
|
14 |
IOW, the problem is how the loop is optimized under -O2. |
15 |
|
16 |
Frank Peters |