Use "-std=gnu99" by default
I get the following error on centos7
get another error as follows, if set -std=c99
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
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?