Re: longjmp clobber warnings are utterly broken in modern gcc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: longjmp clobber warnings are utterly broken in modern gcc
Date: 2015-01-25 20:40:10
Message-ID: 16575.1422218410@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)edu> writes:
> Some Google(tm)ing does turn up plenty of other people complaining about
> similar behaviour. This report seems to have the most enlightening response:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54561

Yeah, I saw that before too. I got an interesting response from Jakub J.
just now as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1185673

It sounds like the appearance of the warning is contingent on code
generation decisions, making it even less likely to ever be useful
to us in its current form.

> Perhaps Clang has a more useful warning?

Clang, at least the version on my Mac, doesn't warn either with the
settings we normally use, and it doesn't have -Wclobber at all.
I tried turning on -Weverything, and it still didn't complain.
(It did generate incorrect code though, so it's no better than gcc
in that respect.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2015-01-25 22:39:22 Re: longjmp clobber warnings are utterly broken in modern gcc
Previous Message Maciek Sakrejda 2015-01-25 20:33:04 Re: Client deadlocks when connecting via ssl