Re: pgsql: "A void function may not return a value".

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: "A void function may not return a value".
Date: 2019-05-18 04:50:08
Message-ID: 661.1558155008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2019-05-18 04:40:51 +0000, Tom Lane wrote:
>> "A void function may not return a value".

> Darn. Thanks.

> For C only, warn about a "return" statement with an expression in a function whose return type is "void", unless the expression type is also
> "void". As a GNU extension, the latter case is accepted without a warning unless -Wpedantic is used.

The scary thing is that apparently almost everybody else has followed
gcc's lead on this.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2019-05-18 13:23:33 pgsql: docs: tighten up PG 12 release note item on 1k partitions
Previous Message Andres Freund 2019-05-18 04:44:35 Re: pgsql: "A void function may not return a value".