The following bug has been logged online: Bug reference: 4052 Logged by: Email address: [EMAIL PROTECTED] 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