RE: Fix compilation warnings when CFLAGS -Og is specified

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Fix compilation warnings when CFLAGS -Og is specified
Date: 2023-08-01 10:25:10
Message-ID: TYAPR01MB5866BCB37ADB02EC29963914F50AA@TYAPR01MB5866.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2023-08-01 11:03:29 Re: Extract numeric filed in JSONB more effectively
Previous Message Amit Kapila 2023-08-01 09:39:01 Re: [PoC] pg_upgrade: allow to upgrade publisher node