Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3

Поиск
Список
Период
Сортировка
Искать
От
Kris Jurka
Тема
Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3
Дата
Msg-id
Pine.BSO.4.64.0803100214130.24272@leary.csoft.net
Ответ на
Список
Дерево обсуждения
Need -fwrapv or -fno-strict-overflow for gcc-4.3 Kris Jurka <books@ejurka.com>
Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3 Tom Lane <tgl@sss.pgh.pa.us>
Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3 Tom Lane <tgl@sss.pgh.pa.us>
Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3 Kris Jurka <books@ejurka.com>


On Mon, 10 Mar 2008, Tom Lane wrote:

> I am wondering if these checks have been no-ops in Postgres builds done 
> with gcc 4.1 and up, and we're only just now being told about it.
>

Since gcc 4.2 supports -Wstrict-overflow, I rebuilt pg with that to see 
what it's doing currently.  I'm not sure what -Wstrict-overflow level 
-Wall implies with gcc 4.3, but I cranked it up to 5 on 4.2 to get the 
most details out of it.  I don't see any of the warnings I saw on 4.3 and 
I get the attached list which looks less dangerous spot checking a couple 
items, but I haven't gone through the whole list.

Additionally the comments in the blog posting[1] I linked to previously, a 
user asks, "how come I don't see any warnings with -Wstrict-overflow on 
gcc 4.2.3" and it's answered "I think the full effects only come in on gcc 
mainline. At least, gcc 4.2 does not eliminate the loop, but gcc 4.3 
will."  So clearly 4.3 is doing something new here, but that doesn't prove 
we're safe on previous versions.

[1] http://www.airs.com/blog/archives/120

Kris Jurka
В списке pgsql-hackers по дате отправления
От: Oleg Bartunov
Дата:
От: Martijn van Oosterhout
Дата:
FAQ