Unix Technical Forum

BUG #4052: GCC update -fwrapv and new -Wstrict-overflow

This is a discussion on BUG #4052: GCC update -fwrapv and new -Wstrict-overflow within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 4052 Logged by: Email address: mjevans1983@gmail.com PostgreSQL version: 8.3.1 Operating ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:15 PM
 
Posts: n/a
Default BUG #4052: GCC update -fwrapv and new -Wstrict-overflow


The following bug has been logged online:

Bug reference: 4052
Logged by:
Email address: mjevans1983@gmail.com
PostgreSQL version: 8.3.1
Operating system: Linux
Description: GCC update -fwrapv and new -Wstrict-overflow
Details:

http://www.airs.com/blog/archives/120

-Wstrict-overflow=5 can be used to find cases where optimizations break not
standard specified overflow cases. (However it sounds like even at level 5
it will only highlight cases that break, not all overflows?)

Quoting:
"However, gcc does need to respond to the concerns of the user community. I
introduced two new options in gcc 4.2. The first is -fno-strict-overflow.
This tells the compiler that it may not assume that signed overflow is
undefined. The second is -Wstrict-overflow. This tells the compiler to warn
about cases where it is using the fact that signed overflow is undefined to
implement an optimization. With these options it is possible to detect cases
where signed overflow occurs in a program, and it is possible to disable
optimizations which rely on signed overflow until the program is fixed. The
-Wstrict-overflow warning even found one minor case where gcc itself relied
on wrapping signed overflow, in the handling of division by the constant
0×80000000."

With a special comment:
"ncm said,

January 10, 2008 @ 2:53 pm

I see what happened:

$ gcc -O3 -Wstrict-overflow=5 -Wall -c t.c

is not the same as

$ gcc -O3 -Wall -Wstrict-overflow=5 -c t.c

Evidently the -Wall in the first example bumps the warning level back down
to 1. ..."

-
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:15 PM
Tom Lane
 
Posts: n/a
Default Re: BUG #4052: GCC update -fwrapv and new -Wstrict-overflow

"" <mjevans1983@gmail.com> writes:
> Description: GCC update -fwrapv and new -Wstrict-overflow


I am not sure what your point is?

regards, tom lane

-
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com