RE: Fix compilation warnings when CFLAGS -Og is specified - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Fix compilation warnings when CFLAGS -Og is specified
Date
Msg-id TYAPR01MB5866BCB37ADB02EC29963914F50AA@TYAPR01MB5866.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Fix compilation warnings when CFLAGS -Og is specified  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
Dear Horiguchi-san,

Thanks for replying!

> > My gcc version is 4.8.5, and ninja is 1.10.2.
>
> gcc 4.8 looks very old?
>
> AFAIS all of those complaints are false positives and if I did this
> correclty, gcc 11.3 seems to have been fixed in this regard.

I switched to newer gcc (8.3, still old...) and tried. As you said it did not raise
such warnings.

> > # Solution
> >
> > PSA the patch to keep the compiler quiet. IIUC my compiler considered that
> > substitutions in PG_TRY() might be skipped. I'm not sure it is real problem,
> > but the workarounds are harmless.
> >
> > Or, did I miss something for ignoring above?
> >
> > [1]:
> https://wiki.postgresql.org/wiki/Developer_FAQ#:~:text=or%20MSVC%20trace
> points.-,What%20debugging%20features%20are%20available%3F,-Compile%2Dti
> me
>
> I think we don't want "fix" those as far as modern compilers don't
> emit the false positives.

OK, I should use newer one for modern codes. Sorry for noise and thank you for confirmation.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PoC] pg_upgrade: allow to upgrade publisher node
Next
From: Matthias van de Meent
Date:
Subject: Re: Extract numeric filed in JSONB more effectively