Skip to content

BLD: Bump our C standard to 11 #55902

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

Merged
merged 1 commit into from
Nov 11, 2023
Merged

Conversation

lithomas1
Copy link
Contributor

@lithomas1 lithomas1 commented Nov 9, 2023

We're getting Cython compilation errors with Cython < 3 and C99, on the wheel builders.

NOTE: Cython 3 seems to handle this OK.

Let's see if C11 fixes it since we can't go directly to Cython 3 yet.

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

We're getting Cython compilation errors with Cython < 3 and C99.
@lithomas1 lithomas1 added the Build Library building on various platforms label Nov 9, 2023
@lithomas1 lithomas1 marked this pull request as ready for review November 9, 2023 22:48
@WillAyd
Copy link
Member

WillAyd commented Nov 9, 2023

FWIW I wouldn't mind even jumping to C17. I don't think people compile against pandas so I don't think we need to worry about supporting old standards.

I'd really love to jump to C23 as soon as all compilers support it

@lithomas1
Copy link
Contributor Author

FWIW I wouldn't mind even jumping to C17. I don't think people compile against pandas so I don't think we need to worry about supporting old standards.

I'd really love to jump to C23 as soon as all compilers support it

Is there anything we need from C17?

IIUC, the C standard doesn't really change that much anymore (at least not a lot compared to C++), and I'd prefer to only bump if we need something from a newer C standard.

@lithomas1 lithomas1 added this to the 2.2 milestone Nov 9, 2023
@WillAyd
Copy link
Member

WillAyd commented Nov 10, 2023

C17 doesn't have any new features. Just bug fixes for C11

@lithomas1
Copy link
Contributor Author

@WillAyd OK to merge here?

I'm a little worried about requiring recent compilers for C17 and above, so maybe we can discuss that in a separate issue?

@WillAyd
Copy link
Member

WillAyd commented Nov 10, 2023

Ok sure merge away. C17 is just bug fixes so I'm not sure which compilers would support one not the other today. But in either case this is an upgrade over C99

@WillAyd WillAyd merged commit 590dfe1 into pandas-dev:main Nov 11, 2023
@WillAyd
Copy link
Member

WillAyd commented Nov 11, 2023

Thanks @lithomas1 good to get this updated

@lithomas1 lithomas1 deleted the bump-c-std branch November 11, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants