Re: silence GCC4 warning - Mailing list pgsql-patches

From Tom Lane
Subject Re: silence GCC4 warning
Date
Msg-id 4409.1120485970@sss.pgh.pa.us
Whole thread Raw
In response to silence GCC4 warning  (Neil Conway <neilc@samurai.com>)
Responses Re: silence GCC4 warning  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> This patch silences a GCC 4.0 warning about a potentially-uninitialized
> variable in pl_comp.c,

AFAICT, gcc4's default behavior is to warn about

    int    foo;

    somefunc(&foo);

which unfortunately is a very common usage that I'm not real thrilled
about having to fix every occurrence of.  I've been meaning to look into
whether they provided a pragma or something to mark function parameters
as output-only, so that this message could be suppressed where
appropriate without adding a lot of useless initializations.

In the meantime, I don't see the point of patching just one place.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: User's exception plpgsql
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Dbsize backend integration