--- Comment #24 from manu at gcc dot gnu dot org 2008-01-21 06:55 ---
(In reply to comment #23)
> It's too bad the bug is closed just as a duplicate of another bug.
I am sorry that you feel disappointed. I believed that the rationale behind
closing this was fairly clear. I tried to answ
--- Comment #23 from sergstesh at yahoo dot com 2008-01-21 05:07 ---
It's too bad the bug is closed just as a duplicate of another bug.
The main points of this bug are:
1) the code triggering the bug uses undefined in "C" standards language
features - behavior in case of integer overfl
--- Comment #22 from manu at gcc dot gnu dot org 2008-01-21 01:10 ---
"make check" failing is expected since there is undefined behaviour in the
program and we warn about it with -Wstrict-overflow=5 (I guess that we warn
with lower values as well, probably simply with -Wstrict-overflow).
--- Comment #21 from sergstesh at yahoo dot com 2008-01-20 22:30 ---
Now that the flags are in this order: -Wall -Wstrict-overflow=5 :
a) the warnings during compilation:
"
[EMAIL
PROTECTED]:/mnt/sda8/sergei/gcc4.2.x-O2_bug/gcc-4.2.2-O2/libsndfile-1.0.17>
grep warn make.log
lpc.c:220:
--- Comment #20 from manu at gcc dot gnu dot org 2008-01-19 00:22 ---
There is a bug (PR32102) where -Wall after -Wstrict-overflow resets the latter
to its default value. I think this is why you didn't get the warning. Removing
-Wall or moving -Wstrict-overflow=5 after it should generate
--- Comment #19 from sergstesh at yahoo dot com 2008-01-18 23:33 ---
Regarding "BTW, is your makefile adding -Wstrict-overflow after or before -Wall
-Wextra?".
Here is how the first action line in 'make.log' looks:
"
23 if /bin/sh ../../libtool --tag=CC --mode=compile
/maxtor5/ser
--- Comment #18 from manu at gcc dot gnu dot org 2008-01-18 18:47 ---
(In reply to comment #15)
> With CFLAGS='-O2 -Wstrict-overflow=5' still there is no warnings in
BTW, is your makefile adding -Wstrict-overflow after or before -Wall -Wextra?
--
manu at gcc dot gnu dot org changed:
--
manu at gcc dot gnu dot org changed:
What|Removed |Added
Status|WAITING |NEW
Ever Confirmed|0 |1
Last reconfirme
--- Comment #17 from manu at gcc dot gnu dot org 2008-01-18 14:49 ---
(In reply to comment #15)
> With CFLAGS='-O2 -Wstrict-overflow=5' still there is no warnings in
> 'make_check.log':
>
> If I do _not_ have "-Wstrict-overflow", I _do_ have these warnings during
> compilation:
Any of
--- Comment #16 from sergstesh at yahoo dot com 2008-01-18 14:19 ---
A general though regarding optimization - do _not_ optimize code producing
warnings, and notify end user, so there will be much more incentive to write
clean code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34
--- Comment #15 from sergstesh at yahoo dot com 2008-01-18 14:08 ---
With CFLAGS='-O2 -Wstrict-overflow=5' still there is no warnings in
'make_check.log':
"
[EMAIL
PROTECTED]:/mnt/sda8/sergei/gcc4.2.x-O2_bug/gcc-4.2.2-O2/libsndfile-1.0.17>
grep -i warn make.log
sndfile.c:491: warning:
--- Comment #14 from manu at gcc dot gnu dot org 2008-01-18 09:47 ---
(In reply to comment #12)
>
> - I do not think this is fine. As end user I want to see my errors the same
> way at any optimization level.
>
We strive to for this when it is feasible and reasonable, but there is a
t
--- Comment #13 from ismail at pardus dot org dot tr 2008-01-18 03:22
---
I don't think thats possible given the fact that an optimization pass modifies
code to be able to well "optimize" it. Implications and merits of -fwrapv is
discussed deeply before, you might want to Google for it.
--- Comment #12 from sergstesh at yahoo dot com 2008-01-18 03:20 ---
Regarding
"
About the dependency on optimization level, signed integer overflow is
undefined in C standard so its not a good idea to depend on it. What GCC does
is exploiting this fact for optimizations which is fine.
--- Comment #11 from ismail at pardus dot org dot tr 2008-01-18 03:10
---
Actually the only bug here is that -Wstrict-overflow should issue a warning for
that line.
About the dependency on optimization level, signed integer overflow is
undefined in C standard so its not a good idea to
--- Comment #10 from sergstesh at yahoo dot com 2008-01-18 03:05 ---
Ismail, the problem, as I see it, is not the failure itself, but rather
dependency on optimization level.
My point is that if the code is buggy WRT signedness, it should be the same
way buggy for any level of optimizat
--- Comment #9 from ismail at pardus dot org dot tr 2008-01-18 02:45
---
File lossy_comp_test.c starting line 761 :
sum_abs = abs (sum_abs + abs (abs (data [k]) - 256)) ;
if (sum_abs < 1.0)
{
printf ("\n\nLine %d: Signal is all zeros (%d, 0x%X).\n", __LINE__, sum_abs,
--- Comment #8 from sergstesh at yahoo dot com 2008-01-18 01:52 ---
With CFLAGS='-O2 -Wstrict-overflow' still no warnings in 'make_check.log' and
"
[EMAIL
PROTECTED]:/mnt/sda8/sergei/gcc4.2.x-O2_bug/gcc-4.2.2-O2/libsndfile-1.0.17>
grep -i warn make.log
sndfile.c:491: warning: the addre
--- Comment #7 from pinskia at gcc dot gnu dot org 2008-01-18 01:46 ---
(In reply to comment #6)
> Did you mean CFLAGS='-O2 -fwrapv -Wstrict-overflow' or, rather,
> CFLAGS='-O2 -Wstrict-overflow' ?
The latter, you will only get the warning if -fwrapv is off as it warns when
the optimize
--- Comment #6 from sergstesh at yahoo dot com 2008-01-18 01:43 ---
I've tried CFLAGS='-O2 -fwrapv -Wstrict-overflow' and I see no warnings at all
in 'make_check.log' file - I tried "grep -i warn make_check.log".
OTOH:
"
[EMAIL
PROTECTED]:/mnt/sda8/sergei/gcc4.2.x-O2_bug/gcc-4.2.2-O2/
--- Comment #5 from pinskia at gcc dot gnu dot org 2008-01-18 01:36 ---
So I think this is just a case of the source depending on signed integers
overflow being defined. Can you try to see if there are any warnings with
-Wstrict-overflow ? If so it might be best if the source gets fixe
--- Comment #4 from sergstesh at yahoo dot com 2008-01-18 01:33 ---
"-O2 -fwrapv" fixes the problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34841
--- Comment #3 from sergstesh at yahoo dot com 2008-01-18 01:28 ---
With "-O2 -fno-strict-aliasing" the failure is still there, I'll check with
"-O2 -fwrapv" right away.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34841
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-01-18 01:18 ---
Can you try -O2 -fno-strict-aliasing or -O2 -fwrapv ? This might not be a GCC
issue but the source could be dependent on undefined behavior.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34841
--- Comment #1 from sergstesh at yahoo dot com 2008-01-18 00:40 ---
The tarball: http://www.filelime.com/upload/files/gcc4.2.x-O2_bug.tar.gz .
--
sergstesh at yahoo dot com changed:
What|Removed |Added
--
25 matches
Mail list logo