| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Convert varatt.h macros to static inline functions |
| Date: | 2025-08-05 22:07:25 |
| Message-ID: | CAD21AoDn70PbqYNrvwFVGuq3ZUsebZ2n+10r8hv3GJgJMyRctQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Aug 5, 2025 at 2:39 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> writes:
> > On Tue, Aug 5, 2025 at 1:59 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Maybe there's some strange cross-distro difference here, but
> >> what I'm wondering is if there's a difference in CFLAGS.
> >> My build used
> >>
> >> CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -Wmissing-variable-declarations -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2
>
> > Yeah, interestingly I didn't see the warning with CFLAGS your build
> > used but got it if I use -O0 instead of -O2.
>
> I checked the buildfarm, and (so far) adder and flaviventris have
> shown this warning, but nothing else has. adder is using gcc 14.2.0
> with -O0, while flaviventris is using gcc 16.0.0 with -O0.
Indeed. Thank you for checking.
> Also
> I tried -O0 with gcc 15.1.1 on my Fedora 42 box, and now it shows the
> warning. So maybe the difference is just -O0? But I think there are
> other buildfarm animals using that, so I'm not certain we've explained
> the difference fully.
>
> Anyway, based on that I think there's enough reason to go ahead
> with your patch.
Agreed. I've attached the patch. I'll push it, barring comments.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Suppress-maybe-uninitialized-warning.patch | application/octet-stream | 1.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-08-05 22:10:54 | Re: fix ancient typo in transformRelOptions() |
| Previous Message | Álvaro Herrera | 2025-08-05 21:56:17 | Re: fix ancient typo in transformRelOptions() |