On Tue, Aug 5, 2025 at 1:59 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Masahiko Sawada <sawada.mshk@gmail.com> writes:
> > On Tue, Aug 5, 2025 at 11:34 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Interesting. I did not see such warnings with gcc 14.3.1, 15.1.1,
> >> nor older gcc versions. Must be something peculiar to 14.2.
>
> > Hmm, I got the same warning with 14.3.1 (exact version shown below) so
> > probably something is strange on my end:
>
> > % gcc --version
> > gcc (GCC) 14.3.1 20250805
>
> That's even more interesting. The specific late-model gcc versions
> I checked were from Fedora 41:
>
> $ gcc --version
> gcc (GCC) 14.3.1 20250523 (Red Hat 14.3.1-1)
>
> and Fedora 42:
>
> gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
>
> 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.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com