libpg_query icon indicating copy to clipboard operation
libpg_query copied to clipboard

Use "-std=gnu99" by default

Open SunBeau opened this issue 2 years ago • 1 comments

I get the following error on centos7 1 get another error as follows, if set -std=c99 2 it will be ok, if set -std=gnu99. so i think that it should use "-std=gnu99" by default. Related question: https://github.com/pganalyze/libpg_query/issues/169

SunBeau avatar Nov 23 '23 06:11 SunBeau

Thanks for the contribution!

In my understanding, this mainly helps older compilers that don't default to C99 already - so I think that generally sounds good. And per my reading of the Postgres mailing list archives, upstream requires C99 since Postgres 12, so we're good in that regard.

That said, I do wonder why -std=c99 doesn't work - that would be slightly preferable to -std=gnu99 if we can make it work. I'm not sure why it errors out like in your second screenshot - maybe we're just missing an include header that GNU mode automatically pulls in?

lfittl avatar Nov 29 '23 09:11 lfittl