http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #13 from Ian Hamilton ---
(In reply to Mark Warner from comment #11)
> I'm confused .. what about..
> for (k = i; k < (int)(sizeof(NSQ_del_dec_struct) / sizeof(opus_int32)); ++k)
> ... is illegal or invalid ?
> Why does it only fail if
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #12 from Jakub Jelinek ---
(In reply to Mark Warner from comment #11)
> I'm confused .. what about..
> for (k = i; k < (int)(sizeof(NSQ_del_dec_struct) / sizeof(opus_int32)); ++k)
> ... is illegal or invalid ?
> Why does it only fail i
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #11 from Mark Warner ---
I'm confused .. what about..
for (k = i; k < (int)(sizeof(NSQ_del_dec_struct) / sizeof(opus_int32)); ++k)
... is illegal or invalid ?
Why does it only fail if -DDEBUG is defined ?
I mean, this code worked fine
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #10 from Jakub Jelinek ---
We have -fsanitize=undefined which can catch some issues, though the array
bounds instrumentation (nor __builtin_object_size based instrumentation) has
not been added yet for GCC 4.9, will be hopefully there
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #9 from Ian Hamilton ---
Yes, that's all proper and correct. The invalid C code induces undefined
behaviour. I don't think anyone is disputing that.
However, to be pragmatic for a moment, the experience of thousands of
developers out
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #8 f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #7 from Marek Polacek ---
(int)(sizeof(NSQ_del_dec_struct) / sizeof(opus_int32) seems to be 1168/4 = 292,
but sLPC_Q14 has only 112 elements.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #6 from Mark Warner ---
If it is invalid, why does -Wall not trigger anything ?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #5 from Mark Warner ---
sizeof(NSQ_del_dec_struct) / sizeof(opus_int32) is guaranteed to produced a
even number with a remainder of 0.
Note the __attribute__ ((__aligned__ (8))) to make it a multiple of 8 in size.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #3 from Ian Hamilton ---
Just a thought.
Does ((int)(sizeof(NSQ_del_dec_struct) / sizeof(opus_int32)) correctly give you
the size of the sLPC_Q14 array?
>From playing with my test case, it seems that if the optimiser spots that k
wil
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
Ian Hamilton changed:
What|Removed |Added
CC||ian at g0tcd dot com
--- Comment #2 from I
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #1 from Mark Warner ---
Created attachment 31945
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31945&action=edit
C source of subroutines which contain problem for loop
This is a file from OPUS. As sent it can't be run, but the
13 matches
Mail list logo