Re: add __attribute__((noreturn)) to suppress a waring - Mailing list pgsql-hackers

From Tom Lane
Subject Re: add __attribute__((noreturn)) to suppress a waring
Date
Msg-id 6210.1295882082@sss.pgh.pa.us
Whole thread Raw
In response to Re: add __attribute__((noreturn)) to suppress a waring  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> On 24.01.2011 03:42, Itagaki Takahiro wrote:
>> To suppress it, I'm thinking to add noreturn to die_horribly().
>> Any objections?  Another solution might be adding a dummy assignment
>> after calls of die_horribly().

> I added a dummy assignment, that's how we've handled this before in 
> pg_dump.

We generally do *not* want to depend on noreturn, because it will not
suppress similar warnings in non-gcc compilers.  Just add a dummy
initialization, or reorganize the code to avoid the problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Vangelis Katsikaros
Date:
Subject: Re: gist README
Next
From: Magnus Hagander
Date:
Subject: Re: Include WAL in base backup