Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "-std=gnu99" by default #221

Open
wants to merge 1 commit into
base: 15-latest
Choose a base branch
from

Conversation

SunBeau
Copy link

@SunBeau SunBeau commented Nov 23, 2023

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: #169

@lfittl
Copy link
Member

lfittl commented Nov 29, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants