Thomas Munro <thomas.munro@gmail.com> writes:
> On Wed, Jan 29, 2020 at 4:05 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> There is absolutely no question that the original coding is illegal
>> per spec, and it isn't even a particularly useful shorthand; so why
>> can't we get even a warning about it?
> $ cc -c -Wpedantic test.c
> test.c:2:12: warning: void function 'g' should not return void
> expression [-Wpedantic]
> void g() { return f(); }
> ^ ~~~
> 1 warning generated.
> Many other constructs in PostgreSQL are rejected by that switch,
> though, and I don't see a way to ask for just that one warning.
Yeah, -Wpedantic is a little *too* pedantic I'm afraid. Oh well.
regards, tom lane